Commit 0b41ceb9bc153852f376fd825565e598398affba

Authored by 杨帅
1 parent 47688717

1 修复围栏id为空时,闪退问题

2 固定所有窗口屏幕为竖屏锁定
moudle_pedometer/src/main/AndroidManifest.xml
... ... @@ -116,30 +116,47 @@
116 116  
117 117 <activity
118 118 android:name="com.cnlive.moudle.pedometer.ui.activity.PedometerMainActivity"
119   - android:launchMode="singleTask" />
  119 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  120 + android:launchMode="singleTask"
  121 + android:screenOrientation="portrait" />
120 122 <activity
121 123 android:name="com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity"
122   - android:launchMode="singleTask" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" -->
  124 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  125 + android:launchMode="singleTask"
  126 + android:screenOrientation="portrait" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" -->
123 127 <activity
124 128 android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity"
125   - android:launchMode="singleTask" />
  129 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  130 + android:launchMode="singleTask"
  131 + android:screenOrientation="portrait" />
126 132 <activity
127 133 android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity"
128   - android:launchMode="singleTask" />
  134 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  135 + android:launchMode="singleTask"
  136 + android:screenOrientation="portrait" />
129 137 <activity
130 138 android:name="com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity"
131   - android:launchMode="singleTask" />
  139 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  140 + android:launchMode="singleTask"
  141 + android:screenOrientation="portrait" />
132 142 <!--全部成绩详情页-->
133 143 <activity
134 144 android:name="com.cnlive.moudle.pedometer.ui.activity.ALLScoreDetailActivity"
135   - android:launchMode="singleTask" />
  145 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  146 + android:launchMode="singleTask"
  147 + android:screenOrientation="portrait" />
136 148 <!--进行中的活动-->
137 149 <activity
138 150 android:name="com.cnlive.moudle.pedometer.ui.activity.OnGoingActivity"
139   - android:launchMode="singleTask" />
  151 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  152 + android:launchMode="singleTask"
  153 + android:screenOrientation="portrait" />
140 154  
141 155 <!--轨迹列表详情页-->
142   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollTraceListDetailActivity" />
  156 + <activity
  157 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollTraceListDetailActivity"
  158 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  159 + android:screenOrientation="portrait" />
143 160 <!--************************************************路径工具**********************************************-->
144 161 <service
145 162 android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService"
... ... @@ -181,11 +198,26 @@
181 198 </intent-filter>
182 199 </receiver>
183 200  
184   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity" />
185   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" -->
186   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity" />
187   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity" />
188   - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity" />
  201 + <activity
  202 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity"
  203 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  204 + android:screenOrientation="portrait" />
  205 + <activity
  206 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity"
  207 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  208 + android:screenOrientation="portrait" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" -->
  209 + <activity
  210 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity"
  211 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  212 + android:screenOrientation="portrait" />
  213 + <activity
  214 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity"
  215 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  216 + android:screenOrientation="portrait" />
  217 + <activity
  218 + android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity"
  219 + android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
  220 + android:screenOrientation="portrait" />
189 221 </application>
190 222  
191 223 </manifest>
192 224 \ No newline at end of file
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunRaceDetailFragmentView.java
... ... @@ -138,10 +138,10 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen
138 138 @Override
139 139 public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
140 140 if (newState == SlidingUpPanelLayout.PanelState.EXPANDED) {
141   - fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.GONE);
142   -
  141 + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.INVISIBLE);
143 142 }
144 143 if (newState == SlidingUpPanelLayout.PanelState.ANCHORED) {
  144 + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.VISIBLE);
145 145 if (isChangeMapState) {
146 146 if (null != baiduMap) {
147 147 if (null != baiduMap.getMapStatus()) {
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
... ... @@ -218,6 +218,15 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
218 218  
219 219 @Override
220 220 public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) {
  221 + if (newState == SlidingUpPanelLayout.PanelState.EXPANDED) {
  222 + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.INVISIBLE);
  223 + }
  224 + if (newState == SlidingUpPanelLayout.PanelState.ANCHORED) {
  225 + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.VISIBLE);
  226 + }
  227 + if (newState == SlidingUpPanelLayout.PanelState.COLLAPSED) {
  228 + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.VISIBLE);
  229 + }
221 230 if (previousState == SlidingUpPanelLayout.PanelState.ANCHORED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) {
222 231 if (fragment.binding.flTop.getVisibility() != View.VISIBLE) {
223 232 QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity());
... ... @@ -970,7 +979,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
970 979 }
971 980 //todo 防止停止后,再次开始,无法获取到赛道的轨迹
972 981 if (runRaceDetailInfo != null) {
973   - if (runRaceDetailInfo.getFenceId() != null) {
  982 + if (runRaceDetailInfo.getFenceId() != null && !TextUtils.isEmpty(runRaceDetailInfo.getFenceId())) {
974 983 //设置围栏ID
975 984 CommonInfo.setFenceId(getContext(), Integer.parseInt(runRaceDetailInfo.getFenceId()));
976 985 }
... ...
moudle_pedometer/src/main/res/layout/layout_run_detail_street.xml
... ... @@ -28,6 +28,7 @@
28 28 android:orientation="vertical">
29 29  
30 30 <ImageView
  31 + android:id="@+id/ivSlideIcon"
31 32 android:layout_width="13dp"
32 33 android:layout_height="7dp"
33 34 android:layout_gravity="center_horizontal"
... ...