Commit 0b41ceb9bc153852f376fd825565e598398affba
1 parent
47688717
1 修复围栏id为空时,闪退问题
2 固定所有窗口屏幕为竖屏锁定
Showing
4 changed files
with
58 additions
and
16 deletions
moudle_pedometer/src/main/AndroidManifest.xml
| @@ -116,30 +116,47 @@ | @@ -116,30 +116,47 @@ | ||
| 116 | 116 | ||
| 117 | <activity | 117 | <activity |
| 118 | android:name="com.cnlive.moudle.pedometer.ui.activity.PedometerMainActivity" | 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 | <activity | 122 | <activity |
| 121 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity" | 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 | <activity | 127 | <activity |
| 124 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity" | 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 | <activity | 132 | <activity |
| 127 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" | 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 | <activity | 137 | <activity |
| 130 | android:name="com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity" | 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 | <activity | 143 | <activity |
| 134 | android:name="com.cnlive.moudle.pedometer.ui.activity.ALLScoreDetailActivity" | 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 | <activity | 149 | <activity |
| 138 | android:name="com.cnlive.moudle.pedometer.ui.activity.OnGoingActivity" | 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 | <service | 161 | <service |
| 145 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" | 162 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" |
| @@ -181,11 +198,26 @@ | @@ -181,11 +198,26 @@ | ||
| 181 | </intent-filter> | 198 | </intent-filter> |
| 182 | </receiver> | 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 | </application> | 221 | </application> |
| 190 | 222 | ||
| 191 | </manifest> | 223 | </manifest> |
| 192 | \ No newline at end of file | 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,10 +138,10 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen | ||
| 138 | @Override | 138 | @Override |
| 139 | public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) { | 139 | public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) { |
| 140 | if (newState == SlidingUpPanelLayout.PanelState.EXPANDED) { | 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 | if (newState == SlidingUpPanelLayout.PanelState.ANCHORED) { | 143 | if (newState == SlidingUpPanelLayout.PanelState.ANCHORED) { |
| 144 | + fragment.binding.includeStreet.ivSlideIcon.setVisibility(View.VISIBLE); | ||
| 145 | if (isChangeMapState) { | 145 | if (isChangeMapState) { |
| 146 | if (null != baiduMap) { | 146 | if (null != baiduMap) { |
| 147 | if (null != baiduMap.getMapStatus()) { | 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,6 +218,15 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 218 | 218 | ||
| 219 | @Override | 219 | @Override |
| 220 | public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) { | 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 | if (previousState == SlidingUpPanelLayout.PanelState.ANCHORED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { | 230 | if (previousState == SlidingUpPanelLayout.PanelState.ANCHORED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { |
| 222 | if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { | 231 | if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { |
| 223 | QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | 232 | QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); |
| @@ -970,7 +979,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -970,7 +979,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 970 | } | 979 | } |
| 971 | //todo 防止停止后,再次开始,无法获取到赛道的轨迹 | 980 | //todo 防止停止后,再次开始,无法获取到赛道的轨迹 |
| 972 | if (runRaceDetailInfo != null) { | 981 | if (runRaceDetailInfo != null) { |
| 973 | - if (runRaceDetailInfo.getFenceId() != null) { | 982 | + if (runRaceDetailInfo.getFenceId() != null && !TextUtils.isEmpty(runRaceDetailInfo.getFenceId())) { |
| 974 | //设置围栏ID | 983 | //设置围栏ID |
| 975 | CommonInfo.setFenceId(getContext(), Integer.parseInt(runRaceDetailInfo.getFenceId())); | 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,6 +28,7 @@ | ||
| 28 | android:orientation="vertical"> | 28 | android:orientation="vertical"> |
| 29 | 29 | ||
| 30 | <ImageView | 30 | <ImageView |
| 31 | + android:id="@+id/ivSlideIcon" | ||
| 31 | android:layout_width="13dp" | 32 | android:layout_width="13dp" |
| 32 | android:layout_height="7dp" | 33 | android:layout_height="7dp" |
| 33 | android:layout_gravity="center_horizontal" | 34 | android:layout_gravity="center_horizontal" |