Commit dceb60be21d5ce79fa50dd9fecb770cf8403f788

Authored by 杨帅
2 parents 23acb4a2 01b8a423
.idea/gradle.xml
@@ -3,6 +3,9 @@ @@ -3,6 +3,9 @@
3 <component name="GradleSettings"> 3 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 4 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 5 <GradleProjectSettings>
  6 + <compositeConfiguration>
  7 + <compositeBuild compositeDefinitionSource="SCRIPT" />
  8 + </compositeConfiguration>
6 <option name="distributionType" value="DEFAULT_WRAPPED" /> 9 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 10 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 <option name="modules"> 11 <option name="modules">
moudle_pedometer/src/main/AndroidManifest.xml
@@ -52,16 +52,36 @@ @@ -52,16 +52,36 @@
52 android:required="true" /> 52 android:required="true" />
53 53
54 <application android:persistent="true"> 54 <application android:persistent="true">
55 - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity"></activity>  
56 - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity" />  
57 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity" />  
58 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" />  
59 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" />  
60 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity" />  
61 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity" />  
62 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity" />  
63 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity" />  
64 - <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity" /> 55 + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity"
  56 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  57 + android:screenOrientation="portrait"/>
  58 + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity"
  59 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  60 + android:screenOrientation="portrait"/>
  61 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity"
  62 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  63 + android:screenOrientation="portrait"/>
  64 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity"
  65 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  66 + android:screenOrientation="portrait"/>
  67 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity"
  68 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  69 + android:screenOrientation="portrait"/>
  70 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RunLineActivity"
  71 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  72 + android:screenOrientation="portrait"/>
  73 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity"
  74 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  75 + android:screenOrientation="portrait"/>
  76 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity"
  77 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  78 + android:screenOrientation="portrait"/>
  79 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity"
  80 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  81 + android:screenOrientation="portrait"/>
  82 + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity"
  83 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  84 + android:screenOrientation="portrait"/>
65 85
66 <service 86 <service
67 android:name="com.cnlive.moudle.pedometer.service.StepService" 87 android:name="com.cnlive.moudle.pedometer.service.StepService"
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/RaceListFragment.java
@@ -9,9 +9,15 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; @@ -9,9 +9,15 @@ import com.cnlive.libs.base.frame.fragment.MvpBindingFragment;
9 import com.cnlive.moudle.collectionTrace.frame.presenter.RaceListPresenter; 9 import com.cnlive.moudle.collectionTrace.frame.presenter.RaceListPresenter;
10 import com.cnlive.moudle.collectionTrace.frame.view.RaceListView; 10 import com.cnlive.moudle.collectionTrace.frame.view.RaceListView;
11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 11 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
  12 +import com.cnlive.moudle.pedometer.model.Constant;
  13 +import com.cnlive.moudle.pedometer.model.MessageEvent;
12 import com.example.moudle_pedometer.R; 14 import com.example.moudle_pedometer.R;
13 import com.example.moudle_pedometer.databinding.FragmentRaceListBinding; 15 import com.example.moudle_pedometer.databinding.FragmentRaceListBinding;
14 16
  17 +import org.greenrobot.eventbus.EventBus;
  18 +import org.greenrobot.eventbus.Subscribe;
  19 +import org.greenrobot.eventbus.ThreadMode;
  20 +
15 /** 21 /**
16 * Created by hanyayun 019/06/24. 22 * Created by hanyayun 019/06/24.
17 */ 23 */
@@ -28,6 +34,9 @@ public class RaceListFragment extends MvpBindingFragment&lt;RaceListView, RaceListP @@ -28,6 +34,9 @@ public class RaceListFragment extends MvpBindingFragment&lt;RaceListView, RaceListP
28 @Override 34 @Override
29 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { 35 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
30 super.onViewCreated(view, savedInstanceState); 36 super.onViewCreated(view, savedInstanceState);
  37 + if (!EventBus.getDefault().isRegistered(this)) {
  38 + EventBus.getDefault().register(this);
  39 + }
31 if(getMvpView() != null)getMvpView().initView(); 40 if(getMvpView() != null)getMvpView().initView();
32 getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()),currentPage,pageSize); 41 getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()),currentPage,pageSize);
33 binding.refreshLayout.setOnRefreshListener(v ->{ 42 binding.refreshLayout.setOnRefreshListener(v ->{
@@ -41,8 +50,25 @@ public class RaceListFragment extends MvpBindingFragment&lt;RaceListView, RaceListP @@ -41,8 +50,25 @@ public class RaceListFragment extends MvpBindingFragment&lt;RaceListView, RaceListP
41 } 50 }
42 51
43 @Override 52 @Override
  53 + public void onDestroy() {
  54 + super.onDestroy();
  55 + if (EventBus.getDefault().isRegistered(this)) {
  56 + EventBus.getDefault().unregister(this);
  57 + }
  58 + }
  59 +
  60 + @Override
44 protected int getLayoutId() { 61 protected int getLayoutId() {
45 return R.layout.fragment_race_list; 62 return R.layout.fragment_race_list;
46 } 63 }
47 64
  65 + @Subscribe(threadMode = ThreadMode.MAIN)
  66 + public void Event(MessageEvent messageEvent) {
  67 + if (messageEvent.getMessageType() == Constant.UPDATA_COLL_BIND_TRACE_LIST) {
  68 + if (getMvpView() != null) {
  69 + currentPage = 1;
  70 + getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()),currentPage,pageSize);
  71 + }
  72 + }
  73 + }
48 } 74 }