Commit d55820bbd681c2d95a2c2792146b4ce5bca06f76
1 parent
5470b0f1
1 修改相关UI
Showing
14 changed files
with
140 additions
and
33 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/ALLScoreDetailFragmentPresenter.java
| ... | ... | @@ -38,8 +38,18 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDe |
| 38 | 38 | } |
| 39 | 39 | //获取当前的时间戳(秒) |
| 40 | 40 | long endTime = 0; |
| 41 | - if (!TextUtils.isEmpty(runningFinishBean.getUserFinishTime())){ | |
| 42 | - endTime = Long.parseLong(runningFinishBean.getUserFinishTime()); | |
| 41 | + //判断当期那用户是否暂停 | |
| 42 | + if (runningFinishBean.isPause()) { | |
| 43 | + //用户暂停了 | |
| 44 | + if (!TextUtils.isEmpty(runningFinishBean.getUserPauseTime())) { | |
| 45 | + endTime = Long.parseLong(runningFinishBean.getUserPauseTime()); | |
| 46 | + } | |
| 47 | + } | |
| 48 | + //没有暂停 | |
| 49 | + else { | |
| 50 | + if (!TextUtils.isEmpty(runningFinishBean.getUserFinishTime())) { | |
| 51 | + endTime = Long.parseLong(runningFinishBean.getUserFinishTime()); | |
| 52 | + } | |
| 43 | 53 | } |
| 44 | 54 | //获取当前的实体名称 |
| 45 | 55 | String entityName = CommonInfo.getUserId(context); |
| ... | ... | @@ -53,9 +63,16 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDe |
| 53 | 63 | if (getView() != null) { |
| 54 | 64 | QMUITipDialogUtil.dismessDialog(); |
| 55 | 65 | if (resultPoints.size() > 1) { |
| 56 | - MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end); | |
| 57 | - //设置地图自动缩放 | |
| 58 | - MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -2f); | |
| 66 | + //用户暂停了 | |
| 67 | + if (runningFinishBean.isPause()) { | |
| 68 | + MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, 0); | |
| 69 | + } | |
| 70 | + //用户没有暂停 | |
| 71 | + else { | |
| 72 | + MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, R.drawable.icon_end); | |
| 73 | + //设置地图自动缩放 | |
| 74 | + MyMapUtil.setMapAutoZoom(getView().baiduMap, resultPoints, -2f); | |
| 75 | + } | |
| 59 | 76 | } |
| 60 | 77 | |
| 61 | 78 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RaceRecorView.java
| 1 | 1 | package com.cnlive.moudle.pedometer.frame.view; |
| 2 | 2 | |
| 3 | 3 | import android.support.v7.widget.LinearLayoutManager; |
| 4 | +import android.text.TextUtils; | |
| 4 | 5 | import android.view.View; |
| 5 | 6 | |
| 6 | 7 | import com.cnlive.libs.base.util.AlertUtil; |
| ... | ... | @@ -98,7 +99,14 @@ public class RaceRecorView implements MvpView { |
| 98 | 99 | runningFinishBean.setUserFinishTime(bean.getEndTime()); |
| 99 | 100 | //设置用户是否完成 |
| 100 | 101 | runningFinishBean.setIsFinish(bean.getCompleteStatus() + ""); |
| 101 | - | |
| 102 | + //设置是否暂停 | |
| 103 | + if (!TextUtils.isEmpty(bean.getPauseTime())) { | |
| 104 | + runningFinishBean.setPause(true); | |
| 105 | + //设置暂停时间 | |
| 106 | + runningFinishBean.setUserPauseTime(bean.getPauseTime()); | |
| 107 | + //设置用户继续时间 | |
| 108 | + runningFinishBean.setUserContinueTime(bean.getContinueTime()); | |
| 109 | + } | |
| 102 | 110 | //设置起点 |
| 103 | 111 | ALLScoreDetailActivity.startActivity(fragment.getActivity(), runningFinishBean); |
| 104 | 112 | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/SelfRecordView.java
| ... | ... | @@ -2,6 +2,7 @@ package com.cnlive.moudle.pedometer.frame.view; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | 4 | import android.support.v7.widget.LinearLayoutManager; |
| 5 | +import android.text.TextUtils; | |
| 5 | 6 | import android.view.View; |
| 6 | 7 | |
| 7 | 8 | import com.cnlive.libs.base.util.AlertUtil; |
| ... | ... | @@ -90,11 +91,19 @@ public class SelfRecordView implements MvpView { |
| 90 | 91 | runningFinishBean.setUserFinishTime(bean.getEndTime()); |
| 91 | 92 | //设置用户是否完成 |
| 92 | 93 | runningFinishBean.setIsFinish(bean.getCompleteStatus() + ""); |
| 93 | - | |
| 94 | + //设置是否暂停 | |
| 95 | + if (!TextUtils.isEmpty(bean.getPauseTime())) { | |
| 96 | + runningFinishBean.setPause(true); | |
| 97 | + //设置暂停时间 | |
| 98 | + runningFinishBean.setUserPauseTime(bean.getPauseTime()); | |
| 99 | + //设置用户继续时间 | |
| 100 | + runningFinishBean.setUserContinueTime(bean.getContinueTime()); | |
| 101 | + } | |
| 94 | 102 | //设置起点 |
| 95 | 103 | ALLScoreDetailActivity.startActivity(fragment.getActivity(), runningFinishBean); |
| 96 | 104 | |
| 97 | - } } | |
| 105 | + } | |
| 106 | + } | |
| 98 | 107 | }); |
| 99 | 108 | } else { |
| 100 | 109 | adapter.notifyDataSetChanged(); |
| ... | ... | @@ -111,13 +120,19 @@ public class SelfRecordView implements MvpView { |
| 111 | 120 | |
| 112 | 121 | SelfRecordInfo.RecordSumBean recordSumBean = selfRecordInfoBaseInfo.getData().getRecordSum(); |
| 113 | 122 | fragment.binding.kilometerNum.setText(recordSumBean.getCountMileage() + ""); |
| 114 | - if(recordSumBean.getYetStep() != null)fragment.binding.stepNum.setText(recordSumBean.getYetStep()); | |
| 115 | - if(recordSumBean.getYetEmployTime() != null)fragment.binding.allTime.setText(TimeUtil.stampToChronometers(Double.parseDouble(recordSumBean.getYetEmployTime()))); | |
| 116 | - if(recordSumBean.getYetNumber() != null)fragment.binding.finishNum.setText(recordSumBean.getYetNumber()); | |
| 117 | - | |
| 118 | - if(recordSumBean.getNotStep() != null)fragment.binding.stepNumNo.setText(recordSumBean.getNotStep()); | |
| 119 | - if(recordSumBean.getNotEmployTime() != null)fragment.binding.allTimeNo.setText(TimeUtil.stampToChronometers(Double.parseDouble(recordSumBean.getNotEmployTime()))); | |
| 120 | - if(recordSumBean.getNotNumber() != null)fragment.binding.finishNumNo.setText(recordSumBean.getNotNumber()); | |
| 123 | + if (recordSumBean.getYetStep() != null) | |
| 124 | + fragment.binding.stepNum.setText(recordSumBean.getYetStep()); | |
| 125 | + if (recordSumBean.getYetEmployTime() != null) | |
| 126 | + fragment.binding.allTime.setText(TimeUtil.stampToChronometers(Double.parseDouble(recordSumBean.getYetEmployTime()))); | |
| 127 | + if (recordSumBean.getYetNumber() != null) | |
| 128 | + fragment.binding.finishNum.setText(recordSumBean.getYetNumber()); | |
| 129 | + | |
| 130 | + if (recordSumBean.getNotStep() != null) | |
| 131 | + fragment.binding.stepNumNo.setText(recordSumBean.getNotStep()); | |
| 132 | + if (recordSumBean.getNotEmployTime() != null) | |
| 133 | + fragment.binding.allTimeNo.setText(TimeUtil.stampToChronometers(Double.parseDouble(recordSumBean.getNotEmployTime()))); | |
| 134 | + if (recordSumBean.getNotNumber() != null) | |
| 135 | + fragment.binding.finishNumNo.setText(recordSumBean.getNotNumber()); | |
| 121 | 136 | |
| 122 | 137 | if (selfRecordInfoBaseInfo.getData().getEventRouteRecordBeanVoList().size() < fragment.pageSize) { |
| 123 | 138 | fragment.binding.refreshLayout.setEnableLoadMore(false); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/model/RunningFinishBean.java
| ... | ... | @@ -21,9 +21,36 @@ public class RunningFinishBean implements Serializable { |
| 21 | 21 | private String isFinish; |
| 22 | 22 | private String roadmap; |
| 23 | 23 | private String streetTitle; |
| 24 | - //后续添加的,用于我的记录详情页跳转 | |
| 24 | + //****************************后续添加的,用于我的记录详情页跳转 | |
| 25 | 25 | private String userStartTime; |
| 26 | 26 | private String userFinishTime; |
| 27 | + private boolean isPause; | |
| 28 | + private String userPauseTime; | |
| 29 | + private String userContinueTime; | |
| 30 | + | |
| 31 | + public boolean isPause() { | |
| 32 | + return isPause; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setPause(boolean pause) { | |
| 36 | + isPause = pause; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public String getUserPauseTime() { | |
| 40 | + return userPauseTime; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setUserPauseTime(String userPauseTime) { | |
| 44 | + this.userPauseTime = userPauseTime; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public String getUserContinueTime() { | |
| 48 | + return userContinueTime; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public void setUserContinueTime(String userContinueTime) { | |
| 52 | + this.userContinueTime = userContinueTime; | |
| 53 | + } | |
| 27 | 54 | |
| 28 | 55 | public String getUserStartTime() { |
| 29 | 56 | return userStartTime; | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/ALLScoreDetailFragment.java
| ... | ... | @@ -12,6 +12,11 @@ import com.cnlive.moudle.pedometer.model.RunningFinishBean; |
| 12 | 12 | import com.example.moudle_pedometer.R; |
| 13 | 13 | import com.example.moudle_pedometer.databinding.FragmentFinishRunMapBinding; |
| 14 | 14 | |
| 15 | +/** | |
| 16 | + * 我的活动-全部成绩 | |
| 17 | + * | |
| 18 | + * @author ShinnyYang | |
| 19 | + */ | |
| 15 | 20 | public class ALLScoreDetailFragment extends QMUIFragment<ALLScoreDetailFragmentView, ALLScoreDetailFragmentPresenter, FragmentFinishRunMapBinding> { |
| 16 | 21 | private RunningFinishBean runningFinishBean; |
| 17 | 22 | ... | ... |
moudle_pedometer/src/main/res/layout/fragment_run_race_detail.xml
moudle_pedometer/src/main/res/layout/fragment_running_map.xml
| ... | ... | @@ -175,7 +175,6 @@ |
| 175 | 175 | android:layout_weight="1" |
| 176 | 176 | android:gravity="center" |
| 177 | 177 | android:orientation="vertical" |
| 178 | - android:paddingLeft="5dp" | |
| 179 | 178 | android:paddingRight="5dp"> |
| 180 | 179 | |
| 181 | 180 | <TextView |
| ... | ... | @@ -183,6 +182,7 @@ |
| 183 | 182 | android:layout_width="wrap_content" |
| 184 | 183 | android:layout_height="wrap_content" |
| 185 | 184 | android:text="--" |
| 185 | + android:layout_marginRight="5dp" | |
| 186 | 186 | android:textColor="@color/black" |
| 187 | 187 | android:textSize="20sp" |
| 188 | 188 | android:textStyle="bold" /> |
| ... | ... | @@ -192,6 +192,7 @@ |
| 192 | 192 | android:layout_height="wrap_content" |
| 193 | 193 | android:layout_marginTop="10dp" |
| 194 | 194 | android:text="距离(km)" |
| 195 | + android:layout_marginRight="5dp" | |
| 195 | 196 | android:textColor="@color/black" |
| 196 | 197 | android:textSize="15sp" /> |
| 197 | 198 | </LinearLayout> | ... | ... |
moudle_pedometer/src/main/res/layout/layout_finish_running_route.xml
| ... | ... | @@ -4,7 +4,10 @@ |
| 4 | 4 | <LinearLayout |
| 5 | 5 | android:layout_width="match_parent" |
| 6 | 6 | android:layout_height="wrap_content" |
| 7 | - android:layout_margin="10dp" | |
| 7 | + android:layout_marginLeft="10dp" | |
| 8 | + android:layout_marginTop="20dp" | |
| 9 | + android:layout_marginRight="10dp" | |
| 10 | + android:layout_marginBottom="10dp" | |
| 8 | 11 | android:background="@drawable/shape_10dp_white_raduis_bg" |
| 9 | 12 | android:orientation="vertical"> |
| 10 | 13 | <!--跑步路线--> |
| ... | ... | @@ -63,7 +66,7 @@ |
| 63 | 66 | <!--竖线--> |
| 64 | 67 | <View |
| 65 | 68 | android:layout_width="1dp" |
| 66 | - android:layout_height="18dp" | |
| 69 | + android:layout_height="25dp" | |
| 67 | 70 | android:layout_marginLeft="17dp" |
| 68 | 71 | android:layout_marginTop="-3dp" |
| 69 | 72 | android:background="@color/vertical_line" /> | ... | ... |
moudle_pedometer/src/main/res/layout/layout_finish_step.xml
| ... | ... | @@ -4,7 +4,10 @@ |
| 4 | 4 | <LinearLayout |
| 5 | 5 | android:layout_width="match_parent" |
| 6 | 6 | android:layout_height="80dp" |
| 7 | - android:layout_margin="10dp" | |
| 7 | + android:layout_marginLeft="10dp" | |
| 8 | + android:layout_marginTop="20dp" | |
| 9 | + android:layout_marginRight="10dp" | |
| 10 | + android:layout_marginBottom="10dp" | |
| 8 | 11 | android:background="@drawable/shape_10dp_white_raduis_bg" |
| 9 | 12 | android:orientation="vertical"> |
| 10 | 13 | ... | ... |
moudle_pedometer/src/main/res/layout/layout_finish_user_info.xml
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | <LinearLayout |
| 10 | 10 | android:layout_width="match_parent" |
| 11 | - android:layout_height="190dp" | |
| 11 | + android:layout_height="200dp" | |
| 12 | 12 | android:layout_marginTop="30dp" |
| 13 | 13 | android:background="@drawable/shape_10dp_white_raduis_bg" |
| 14 | 14 | android:orientation="vertical"> |
| ... | ... | @@ -113,6 +113,7 @@ |
| 113 | 113 | android:layout_width="wrap_content" |
| 114 | 114 | android:layout_height="wrap_content" |
| 115 | 115 | android:layout_marginTop="5dp" |
| 116 | + android:layout_marginBottom="10dp" | |
| 116 | 117 | android:text="配速" |
| 117 | 118 | android:textColor="@color/text_black" |
| 118 | 119 | android:textSize="15sp" /> |
| ... | ... | @@ -138,6 +139,7 @@ |
| 138 | 139 | android:layout_width="wrap_content" |
| 139 | 140 | android:layout_height="wrap_content" |
| 140 | 141 | android:layout_marginTop="5dp" |
| 142 | + android:layout_marginBottom="10dp" | |
| 141 | 143 | android:text="用时" |
| 142 | 144 | android:textColor="@color/text_black" |
| 143 | 145 | android:textSize="15sp" /> | ... | ... |
moudle_pedometer/src/main/res/layout/layout_run_detail_person_score.xml
| ... | ... | @@ -9,7 +9,7 @@ |
| 9 | 9 | <!--个人最佳成绩--> |
| 10 | 10 | <LinearLayout |
| 11 | 11 | android:layout_width="match_parent" |
| 12 | - android:layout_height="180dp" | |
| 12 | + android:layout_height="200dp" | |
| 13 | 13 | android:background="@drawable/white_shadow_bg" |
| 14 | 14 | android:orientation="vertical" |
| 15 | 15 | android:paddingLeft="15dp" | ... | ... |
moudle_pedometer/src/main/res/layout/layout_run_detail_rank.xml
moudle_pedometer/src/main/res/layout/layout_run_detail_street.xml
| ... | ... | @@ -3,7 +3,8 @@ |
| 3 | 3 | |
| 4 | 4 | <LinearLayout xmlns:FivePersonIconView="http://schemas.android.com/apk/res-auto" |
| 5 | 5 | android:layout_width="match_parent" |
| 6 | - android:layout_height="wrap_content"> | |
| 6 | + android:layout_height="wrap_content" | |
| 7 | + android:background="@color/white"> | |
| 7 | 8 | |
| 8 | 9 | <LinearLayout |
| 9 | 10 | android:id="@+id/ll_run_detail_street_root" |
| ... | ... | @@ -78,6 +79,14 @@ |
| 78 | 79 | |
| 79 | 80 | </LinearLayout> |
| 80 | 81 | </LinearLayout> |
| 82 | + | |
| 83 | + <View | |
| 84 | + android:layout_width="match_parent" | |
| 85 | + android:layout_height="1dp" | |
| 86 | + android:layout_marginLeft="35dp" | |
| 87 | + android:layout_marginRight="35dp" | |
| 88 | + android:layout_marginBottom="5dp" | |
| 89 | + android:background="@color/line" /> | |
| 81 | 90 | <!--按钮--> |
| 82 | 91 | <RelativeLayout |
| 83 | 92 | android:id="@+id/rl_start_btn" |
| ... | ... | @@ -128,8 +137,8 @@ |
| 128 | 137 | android:gravity="center_vertical"> |
| 129 | 138 | |
| 130 | 139 | <View |
| 131 | - android:layout_width="10dp" | |
| 132 | - android:layout_height="10dp" | |
| 140 | + android:layout_width="6dp" | |
| 141 | + android:layout_height="6dp" | |
| 133 | 142 | android:layout_marginLeft="25dp" |
| 134 | 143 | android:background="@drawable/shape_circle_green" /> |
| 135 | 144 | |
| ... | ... | @@ -150,6 +159,14 @@ |
| 150 | 159 | android:textColor="@color/text_black" |
| 151 | 160 | android:textSize="15sp" /> |
| 152 | 161 | </LinearLayout> |
| 162 | + <!--竖线--> | |
| 163 | + <View | |
| 164 | + android:layout_width="1dp" | |
| 165 | + android:layout_height="20dp" | |
| 166 | + android:layout_marginLeft="37dp" | |
| 167 | + android:layout_marginTop="-3dp" | |
| 168 | + android:layout_marginBottom="-13dp" | |
| 169 | + android:background="@color/vertical_line" /> | |
| 153 | 170 | <!--终点--> |
| 154 | 171 | <LinearLayout |
| 155 | 172 | android:id="@+id/ll_end_point" |
| ... | ... | @@ -160,8 +177,8 @@ |
| 160 | 177 | android:gravity="center_vertical"> |
| 161 | 178 | |
| 162 | 179 | <View |
| 163 | - android:layout_width="10dp" | |
| 164 | - android:layout_height="10dp" | |
| 180 | + android:layout_width="6dp" | |
| 181 | + android:layout_height="6dp" | |
| 165 | 182 | android:layout_marginLeft="25dp" |
| 166 | 183 | android:background="@drawable/shape_circle_red" /> |
| 167 | 184 | |
| ... | ... | @@ -242,9 +259,9 @@ |
| 242 | 259 | <View |
| 243 | 260 | android:layout_width="match_parent" |
| 244 | 261 | android:layout_height="1dp" |
| 245 | - android:layout_marginLeft="10dp" | |
| 262 | + android:layout_marginLeft="35dp" | |
| 246 | 263 | android:layout_marginTop="5dp" |
| 247 | - android:layout_marginRight="10dp" | |
| 264 | + android:layout_marginRight="35dp" | |
| 248 | 265 | android:background="@color/line" /> |
| 249 | 266 | <!--活动时间--> |
| 250 | 267 | <LinearLayout |
| ... | ... | @@ -304,9 +321,9 @@ |
| 304 | 321 | <View |
| 305 | 322 | android:layout_width="match_parent" |
| 306 | 323 | android:layout_height="1dp" |
| 307 | - android:layout_marginLeft="10dp" | |
| 324 | + android:layout_marginLeft="35dp" | |
| 308 | 325 | android:layout_marginTop="5dp" |
| 309 | - android:layout_marginRight="10dp" | |
| 326 | + android:layout_marginRight="35dp" | |
| 310 | 327 | android:background="@color/line" /> |
| 311 | 328 | <!--活动类型--> |
| 312 | 329 | <LinearLayout |
| ... | ... | @@ -347,6 +364,14 @@ |
| 347 | 364 | android:textStyle="bold" /> |
| 348 | 365 | |
| 349 | 366 | </LinearLayout> |
| 367 | + | |
| 368 | + <View | |
| 369 | + android:layout_width="match_parent" | |
| 370 | + android:layout_height="1dp" | |
| 371 | + android:layout_marginLeft="35dp" | |
| 372 | + android:layout_marginTop="5dp" | |
| 373 | + android:layout_marginRight="35dp" | |
| 374 | + android:background="@color/line" /> | |
| 350 | 375 | <!--参与人数--> |
| 351 | 376 | <LinearLayout |
| 352 | 377 | android:layout_width="match_parent" | ... | ... |
moudle_pedometer/src/main/res/layout/layout_run_detail_street_introduce.xml
| ... | ... | @@ -13,7 +13,7 @@ |
| 13 | 13 | android:id="@+id/tv_race_title" |
| 14 | 14 | android:layout_width="wrap_content" |
| 15 | 15 | android:layout_height="wrap_content" |
| 16 | - android:layout_marginTop="10dp" | |
| 16 | + android:layout_marginTop="18dp" | |
| 17 | 17 | android:text="@string/layout_run_detail_street_introduce_title" |
| 18 | 18 | android:textSize="18sp" |
| 19 | 19 | android:textStyle="bold" /> | ... | ... |