Commit 4e66d4a11f3543d37ee319a2cc923900a4c436be

Authored by 韩亚云
1 parent b144777e

我的活动item跳转

config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.0.4",
  24 + version: "0.0.6",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/MyRecordView.java
1 1 package com.cnlive.moudle.pedometer.frame.view;
2 2  
  3 +import android.content.Intent;
3 4 import android.support.v7.widget.LinearLayoutManager;
4 5 import android.view.View;
5 6  
  7 +import com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity;
6 8 import com.cnlive.moudle.pedometer.ui.adapter.MyRecordAdapter;
7 9 import com.cnlive.moudle.pedometer.ui.fragment.MyRecordFragment;
8 10 import com.hannesdorfmann.mosby3.mvp.MvpView;
... ... @@ -28,7 +30,15 @@ public class MyRecordView implements MvpView {
28 30 list.add("fff");
29 31 list.add("fff");
30 32 list.add("fff");
31   - fragment.binding.myRecordRecy.setAdapter(new MyRecordAdapter(list,fragment.getActivity(),true));
  33 + MyRecordAdapter myRecordAdapter = new MyRecordAdapter(list,fragment.getActivity(),true);
  34 + fragment.binding.myRecordRecy.setAdapter(myRecordAdapter);
  35 + myRecordAdapter.setClickListener(new MyRecordAdapter.OnClickListener() {
  36 + @Override
  37 + public void onClickListener(String msg, int position) {
  38 + Intent intent = new Intent(fragment.getActivity(), RunRaceDetailActivity.class);
  39 + fragment.getActivity().startActivity(intent);
  40 + }
  41 + });
32 42 }
33 43  
34 44 public void initView(){
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunLineFragment.java
... ... @@ -44,7 +44,7 @@ public class RunLineFragment extends Fragment {
44 44 @Override
45 45 public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
46 46 super.onViewCreated(view, savedInstanceState);
47   - binding.topbar.setTitle("我的活动");
  47 + binding.topbar.setTitle("约跑路线");
48 48 binding.topbar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> {
49 49 getActivity().finish();
50 50 });
... ...
moudle_pedometer/src/main/res/layout/activity_my_record.xml
... ... @@ -5,6 +5,7 @@
5 5 android:layout_width="match_parent"
6 6 android:layout_height="match_parent"
7 7 android:orientation="vertical"
  8 + android:background="@color/white"
8 9 tools:context="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity">
9 10  
10 11 <com.qmuiteam.qmui.widget.QMUITopBar
... ... @@ -18,7 +19,6 @@
18 19 android:layout_height="wrap_content"
19 20 app:tabIndicatorColor="#23D41E"
20 21 app:tabIndicatorHeight="2dp"
21   - android:background="@color/white"
22 22 android:layout_gravity="center_horizontal"
23 23 app:tabMode="scrollable"
24 24 app:tabSelectedTextColor="#23D41E"
... ... @@ -27,7 +27,8 @@
27 27 <android.support.v4.view.ViewPager
28 28 android:id="@+id/viewpager"
29 29 android:layout_width="match_parent"
30   - android:layout_height="match_parent" />
  30 + android:layout_height="match_parent"
  31 + android:background="#F7F4F4"/>
31 32  
32 33  
33 34 </LinearLayout>
... ...