Commit 8b47b0b74bb2e8d40dd6d668d5f71f3583aa1ded
Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/ModulePedometer
Showing
15 changed files
with
552 additions
and
27 deletions
moudle_pedometer/src/main/AndroidManifest.xml
| ... | ... | @@ -135,12 +135,15 @@ |
| 135 | 135 | android:process=":step" /> |
| 136 | 136 | <activity |
| 137 | 137 | android:name="com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity" |
| 138 | - android:launchMode="singleTask" | |
| 139 | - /> | |
| 138 | + android:launchMode="singleTask" /> | |
| 140 | 139 | <!--全部成绩详情页--> |
| 141 | 140 | <activity |
| 142 | 141 | android:name="com.cnlive.moudle.pedometer.ui.activity.ALLScoreDetailActivity" |
| 143 | 142 | android:launchMode="singleTask" /> |
| 143 | + <!--进行中的活动--> | |
| 144 | + <activity | |
| 145 | + android:name="com.cnlive.moudle.pedometer.ui.activity.OnGoingActivity" | |
| 146 | + android:launchMode="singleTask" /> | |
| 144 | 147 | <!--************************************************路径工具**********************************************--> |
| 145 | 148 | <service |
| 146 | 149 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/ALLScoreDetailFragmentPresenter.java
| ... | ... | @@ -19,6 +19,7 @@ import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; |
| 19 | 19 | import com.example.moudle_pedometer.R; |
| 20 | 20 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 21 | 21 | |
| 22 | +import java.util.ArrayList; | |
| 22 | 23 | import java.util.List; |
| 23 | 24 | |
| 24 | 25 | public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDetailFragmentView> { |
| ... | ... | @@ -56,6 +57,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDe |
| 56 | 57 | if (mClient == null) { |
| 57 | 58 | mClient = new LBSTraceClient(context); |
| 58 | 59 | } |
| 60 | + List<LatLng> allResultList = new ArrayList<>(); | |
| 59 | 61 | MyMapUtil.queryHistoryTrace(context, mClient, entityName, startTime, endTime, new MyMapUtil.CallBack() { |
| 60 | 62 | @Override |
| 61 | 63 | public void success(List<LatLng> resultPoints) { |
| ... | ... | @@ -66,6 +68,7 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDe |
| 66 | 68 | //用户暂停了 |
| 67 | 69 | if (runningFinishBean.isPause()) { |
| 68 | 70 | MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, R.drawable.icon_start, 0); |
| 71 | + allResultList.addAll(resultPoints); | |
| 69 | 72 | } |
| 70 | 73 | //用户没有暂停 |
| 71 | 74 | else { |
| ... | ... | @@ -76,6 +79,30 @@ public class ALLScoreDetailFragmentPresenter extends MvpBasePresenter<ALLScoreDe |
| 76 | 79 | } |
| 77 | 80 | |
| 78 | 81 | } |
| 82 | + //如果用户点击暂停按钮,进行分段查询 | |
| 83 | + if (runningFinishBean.isPause()) { | |
| 84 | + long continueTime = 0; | |
| 85 | + if (!TextUtils.isEmpty(runningFinishBean.getUserContinueTime())) { | |
| 86 | + continueTime = Long.parseLong(runningFinishBean.getUserContinueTime()); | |
| 87 | + } | |
| 88 | + long userFinishTime = 0; | |
| 89 | + if (!TextUtils.isEmpty(runningFinishBean.getUserFinishTime())) { | |
| 90 | + userFinishTime = Long.parseLong(runningFinishBean.getUserFinishTime()); | |
| 91 | + } | |
| 92 | + //开始进行轨迹查询 | |
| 93 | + MyMapUtil.queryHistoryTrace(context, mClient, entityName, continueTime, userFinishTime, new MyMapUtil.CallBack() { | |
| 94 | + @Override | |
| 95 | + public void success(List<LatLng> resultPoints) { | |
| 96 | + if (null != resultPoints && resultPoints.size() > 1) { | |
| 97 | + MyMapUtil.drawHistoryTrack(context, getView().baiduMap, resultPoints, SortType.asc, R.color.red, 0, R.drawable.icon_end); | |
| 98 | + //设置地图自动缩放 | |
| 99 | + allResultList.addAll(resultPoints); | |
| 100 | + MyMapUtil.setMapAutoZoom(getView().baiduMap, allResultList, -2f); | |
| 101 | + } | |
| 102 | + } | |
| 103 | + }); | |
| 104 | +// | |
| 105 | + } | |
| 79 | 106 | } |
| 80 | 107 | //查询失败 |
| 81 | 108 | else { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/OnGoingFragmentPresenter.java
0 → 100644
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/OnGoingFragmentView.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.frame.view; | |
| 2 | + | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Context; | |
| 5 | +import android.text.TextUtils; | |
| 6 | +import android.util.Log; | |
| 7 | +import android.view.View; | |
| 8 | +import android.widget.LinearLayout; | |
| 9 | + | |
| 10 | +import com.alibaba.android.arouter.launcher.ARouter; | |
| 11 | +import com.baidu.mapapi.map.BaiduMap; | |
| 12 | +import com.baidu.mapapi.map.MapView; | |
| 13 | +import com.baidu.mapapi.map.UiSettings; | |
| 14 | +import com.baidu.mapapi.model.LatLng; | |
| 15 | +import com.baidu.mapapi.utils.DistanceUtil; | |
| 16 | +import com.baidu.trace.LBSTraceClient; | |
| 17 | +import com.baidu.trace.model.SortType; | |
| 18 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 19 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | |
| 20 | +import com.cnlive.moudle.pedometer.model.Constant; | |
| 21 | +import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo; | |
| 22 | +import com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity; | |
| 23 | +import com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity; | |
| 24 | +import com.cnlive.moudle.pedometer.ui.activity.TakePartActivity; | |
| 25 | +import com.cnlive.moudle.pedometer.ui.fragment.OnGoingFragment; | |
| 26 | +import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; | |
| 27 | +import com.cnlive.moudle.pedometer.ui.widget.TipDialog; | |
| 28 | +import com.cnlive.moudle.pedometer.utils.GsonUtil; | |
| 29 | +import com.cnlive.moudle.pedometer.utils.MyMapUtil; | |
| 30 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | |
| 31 | +import com.cnlive.moudle.pedometer.utils.ScreenUtil; | |
| 32 | +import com.cnlive.moudle.pedometer.utils.StepUtil; | |
| 33 | +import com.cnlive.moudle.pedometer.utils.TimeUtil; | |
| 34 | +import com.cnlive.strike.application.GlideApp; | |
| 35 | +import com.example.moudle_pedometer.R; | |
| 36 | +import com.hannesdorfmann.mosby3.mvp.MvpView; | |
| 37 | +import com.qmuiteam.qmui.util.QMUIStatusBarHelper; | |
| 38 | +import com.sothree.slidinguppanel.SlidingUpPanelLayout; | |
| 39 | + | |
| 40 | +import java.util.List; | |
| 41 | + | |
| 42 | +public class OnGoingFragmentView implements MvpView { | |
| 43 | + private OnGoingFragment fragment; | |
| 44 | + private BaiduMap baiduMap; | |
| 45 | + private MapView mMapView; | |
| 46 | + private UiSettings mUiSettings; | |
| 47 | + public RunRaceDetailInfo runRaceDetailInfo; | |
| 48 | + | |
| 49 | + public OnGoingFragmentView(OnGoingFragment fragment) { | |
| 50 | + this.fragment = fragment; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public Activity getContext() { | |
| 54 | + return fragment == null ? null : fragment.getActivity(); | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void initView(RunRaceDetailInfo runRaceDetailInfo) { | |
| 58 | + | |
| 59 | + if (fragment.getActivity() == null) { | |
| 60 | + return; | |
| 61 | + } | |
| 62 | + this.runRaceDetailInfo = runRaceDetailInfo; | |
| 63 | + //轨迹开始时间 | |
| 64 | + long startTime = 0; | |
| 65 | + //轨迹结束时间 | |
| 66 | + long endTime = 0; | |
| 67 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getStartTime()) && !TextUtils.isEmpty(runRaceDetailInfo.getEndTime()) && !TextUtils.isEmpty(runRaceDetailInfo.getEntityName())) { | |
| 68 | + startTime = Long.parseLong(runRaceDetailInfo.getStartTime()); | |
| 69 | + endTime = Long.parseLong(runRaceDetailInfo.getEndTime()); | |
| 70 | + //todo 注意后续查询历史轨迹的时候,必须查数据库中的时间,因为涉及到历史运动恢复,所以不能用这个sp文件中的,这里设置,只是为了在服务启动成功后, | |
| 71 | + | |
| 72 | + //显示地图 | |
| 73 | + fragment.binding.mapView.setVisibility(View.VISIBLE); | |
| 74 | + //显示底部滑动卡片 | |
| 75 | +// fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); | |
| 76 | + //隐藏空视图 | |
| 77 | + fragment.binding.emptyLayout.setVisibility(View.GONE); | |
| 78 | + //显示立即报名按钮 | |
| 79 | +// fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | |
| 80 | + //设置底部卡片第一次可滑动的位置 | |
| 81 | + fragment.binding.slidingLayout.setAnchorPoint(0.6f); | |
| 82 | + fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { | |
| 83 | + @Override | |
| 84 | + public void onPanelSlide(View panel, float slideOffset) { | |
| 85 | + //设置顶层卡片特效 | |
| 86 | +// if (slideOffset > 0.6) { | |
| 87 | +// fragment.binding.llTop.setVisibility(View.VISIBLE); | |
| 88 | +//// ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) fragment.binding.scrollView.getLayoutParams(); | |
| 89 | +//// params.topMargin = ScreenUtil.dip2px(getContext(), 50); | |
| 90 | +//// fragment.binding.scrollView.setLayoutParams(params); | |
| 91 | +// } else { | |
| 92 | +// fragment.binding.llTop.setVisibility(View.GONE); | |
| 93 | +// } | |
| 94 | + if (slideOffset <= 0.6) { | |
| 95 | + if (fragment.binding.flTop.getVisibility() == View.VISIBLE) { | |
| 96 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 97 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 98 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 99 | + } | |
| 100 | + } | |
| 101 | + //设置卡片缩放特效 | |
| 102 | + if (slideOffset >= 0 && slideOffset <= 1) { | |
| 103 | + int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); | |
| 104 | + LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); | |
| 105 | + int current = (int) (leakWidth * slideOffset); | |
| 106 | +// Log.e(TAG, "current: " + current + ",leakWidth:" + leakWidth + ",ScreenUtil:" + ScreenUtil.dip2px(getContext(), 15)); | |
| 107 | + if (slideOffset == 0) { | |
| 108 | + layoutParams.setMargins(ScreenUtil.dip2px(getContext(), 15), 0, ScreenUtil.dip2px(getContext(), 15), 0); | |
| 109 | + fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | |
| 110 | + fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); | |
| 111 | + } | |
| 112 | + if (leakWidth - ScreenUtil.dip2px(getContext(), current) <= ScreenUtil.dip2px(getContext(), 15)) { | |
| 113 | + if (leakWidth - ScreenUtil.dip2px(getContext(), current) >= 0) { | |
| 114 | + layoutParams.setMargins(leakWidth - ScreenUtil.dip2px(getContext(), current), 0, leakWidth - ScreenUtil.dip2px(getContext(), current), 0); | |
| 115 | + } else { | |
| 116 | + layoutParams.setMargins(0, 0, 0, 0); | |
| 117 | + } | |
| 118 | + | |
| 119 | + fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | |
| 120 | + fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); | |
| 121 | + } | |
| 122 | + | |
| 123 | + } | |
| 124 | + | |
| 125 | +// if (slideOffset == 0) { | |
| 126 | +// //在初始位置 | |
| 127 | +// if (fragment.binding.includeStreet.rlStartBtn.getVisibility() == View.GONE) { | |
| 128 | +// fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | |
| 129 | +// } | |
| 130 | +// | |
| 131 | +// } else { | |
| 132 | +// //用户进行滑动 | |
| 133 | +// if (fragment.binding.includeStreet.rlStartBtn.getVisibility() == View.VISIBLE) { | |
| 134 | +// fragment.binding.includeStreet.rlStartBtn.setVisibility(View.GONE); | |
| 135 | +// } | |
| 136 | +// } | |
| 137 | + } | |
| 138 | + | |
| 139 | + @Override | |
| 140 | + public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) { | |
| 141 | +// Log.e(TAG, "previousState: " + previousState + ",newState:" + newState); | |
| 142 | + if (previousState == SlidingUpPanelLayout.PanelState.ANCHORED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { | |
| 143 | + if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { | |
| 144 | + QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | |
| 145 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | |
| 146 | + fragment.binding.flTop.setVisibility(View.VISIBLE); | |
| 147 | + | |
| 148 | + } | |
| 149 | + } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.EXPANDED) { | |
| 150 | + if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { | |
| 151 | + QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | |
| 152 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | |
| 153 | + fragment.binding.flTop.setVisibility(View.VISIBLE); | |
| 154 | + | |
| 155 | + } | |
| 156 | + } else if (previousState == SlidingUpPanelLayout.PanelState.EXPANDED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { | |
| 157 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 158 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 159 | + | |
| 160 | + if (fragment.binding.flTop.getVisibility() != View.GONE) { | |
| 161 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 162 | + } | |
| 163 | + } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.ANCHORED) { | |
| 164 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 165 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 166 | + | |
| 167 | + if (fragment.binding.flTop.getVisibility() != View.GONE) { | |
| 168 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 169 | + } | |
| 170 | + } | |
| 171 | + | |
| 172 | + } | |
| 173 | + }); | |
| 174 | + //卡片滑动上层标题 | |
| 175 | + fragment.binding.llTopBack.setOnClickListener(new View.OnClickListener() { | |
| 176 | + @Override | |
| 177 | + public void onClick(View view) { | |
| 178 | + if (getContext() == null) { | |
| 179 | + return; | |
| 180 | + } | |
| 181 | + fragment.getActivity().finish(); | |
| 182 | + } | |
| 183 | + }); | |
| 184 | + /*************************设置相关页面数据***************************/ | |
| 185 | + if (runRaceDetailInfo.getFenceId() != null) { | |
| 186 | + //设置围栏ID | |
| 187 | + CommonInfo.setFenceId(getContext(), Integer.parseInt(runRaceDetailInfo.getFenceId())); | |
| 188 | + } | |
| 189 | + //设置标题 | |
| 190 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getTitle())) { | |
| 191 | + fragment.binding.includeStreet.tvRaceTitle.setText(runRaceDetailInfo.getTitle()); | |
| 192 | + //根据标题字数动态设置卡片高度 | |
| 193 | + if (runRaceDetailInfo.getTitle().length() > 19) { | |
| 194 | + fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 200)); | |
| 195 | + } else { | |
| 196 | + fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 181)); | |
| 197 | + } | |
| 198 | + fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); | |
| 199 | + } | |
| 200 | + //设置活动地点 | |
| 201 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getAddress())) { | |
| 202 | + fragment.binding.includeStreet.tvAddress.setText(runRaceDetailInfo.getAddress()); | |
| 203 | + //设置活动距离 | |
| 204 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getMileage())) { | |
| 205 | + fragment.binding.includeStreet.tvAddress.append("\t\t" + runRaceDetailInfo.getMileage()); | |
| 206 | + } | |
| 207 | + } | |
| 208 | + | |
| 209 | + //设置起点 | |
| 210 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getStartLocation())) { | |
| 211 | + fragment.binding.includeStreet.tvStartAddr.setText(runRaceDetailInfo.getStartLocation()); | |
| 212 | + } | |
| 213 | + //设置终点 | |
| 214 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getEndLocation())) { | |
| 215 | + fragment.binding.includeStreet.tvEndAddr.setText(runRaceDetailInfo.getEndLocation()); | |
| 216 | + } | |
| 217 | + //设置起始报名时间 | |
| 218 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy.MM.dd"))) { | |
| 219 | + fragment.binding.includeStreet.tvSignUpStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy.MM.dd")); | |
| 220 | + | |
| 221 | + } | |
| 222 | + //设置终止报名时间 | |
| 223 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy.MM.dd"))) { | |
| 224 | + fragment.binding.includeStreet.tvSignUpEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy.MM.dd")); | |
| 225 | + } | |
| 226 | + //设置活动开始时间 | |
| 227 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy.MM.dd"))) { | |
| 228 | + fragment.binding.includeStreet.tvActiveStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy.MM.dd")); | |
| 229 | + } | |
| 230 | + //设置活动结束时间 | |
| 231 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd"))) { | |
| 232 | + fragment.binding.includeStreet.tvActiveEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd")); | |
| 233 | + } | |
| 234 | + //设置活动类型 | |
| 235 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getEventType())) { | |
| 236 | + fragment.binding.includeStreet.tvEventType.setText(runRaceDetailInfo.getEventType()); | |
| 237 | + } | |
| 238 | + //设置参加人数 | |
| 239 | + fragment.binding.includeStreet.tvSignPerson.setText(runRaceDetailInfo.getSignupNum() + ""); | |
| 240 | + //设置报名完成的头像 | |
| 241 | + List<String> joinFaceIcon = runRaceDetailInfo.getFaceUrl(); | |
| 242 | + if (joinFaceIcon != null && joinFaceIcon.size() > 0) { | |
| 243 | + fragment.binding.includeStreet.fiveJoinPerson.setVisibility(View.VISIBLE); | |
| 244 | + //设置头像数据 | |
| 245 | + fragment.binding.includeStreet.fiveJoinPerson.initIconData(joinFaceIcon); | |
| 246 | + } else { | |
| 247 | + fragment.binding.includeStreet.fiveJoinPerson.setVisibility(View.INVISIBLE); | |
| 248 | + } | |
| 249 | + | |
| 250 | + //判断是否显示个人排行榜 | |
| 251 | + if (runRaceDetailInfo.isIndividualAchievement()) { | |
| 252 | + //显示 | |
| 253 | + fragment.binding.includePersonScore.llPersonScoreRoot.setVisibility(View.VISIBLE); | |
| 254 | + //设置完成人数 | |
| 255 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getFinishNum())) { | |
| 256 | + fragment.binding.includeRank.tvFinishPerson.setText(runRaceDetailInfo.getFinishNum()); | |
| 257 | + } | |
| 258 | + //设置个人行走距离 | |
| 259 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getUserMileage())) { | |
| 260 | + fragment.binding.includePersonScore.tvUserDistance.setText(runRaceDetailInfo.getUserMileage()); | |
| 261 | + } | |
| 262 | + //设置行走步数 | |
| 263 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getStep())) { | |
| 264 | + fragment.binding.includePersonScore.tvStep.setText(runRaceDetailInfo.getStep()); | |
| 265 | + } | |
| 266 | + //设置用时 | |
| 267 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getEmployTime())) { | |
| 268 | + fragment.binding.includePersonScore.tvEmployTime.setText(runRaceDetailInfo.getEmployTime()); | |
| 269 | + } | |
| 270 | + //设置配速 | |
| 271 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getPace())) { | |
| 272 | + fragment.binding.includePersonScore.tvSpeed.setText(runRaceDetailInfo.getPace()); | |
| 273 | + } | |
| 274 | + } else { | |
| 275 | + //隐藏 | |
| 276 | + fragment.binding.includePersonScore.llPersonScoreRoot.setVisibility(View.GONE); | |
| 277 | + } | |
| 278 | + //设置是否显示排行榜 | |
| 279 | + if (runRaceDetailInfo.isRanking()) { | |
| 280 | + fragment.binding.includeRank.llRankRoot.setVisibility(View.VISIBLE); | |
| 281 | + //设置第一名头像 | |
| 282 | + GlideApp.with(getContext()).load(runRaceDetailInfo.getFirstFaceUrl()).into(fragment.binding.includeRank.ivFirstPersonUrl); | |
| 283 | + //设置排行榜头像 | |
| 284 | + List<String> finishFaceUrl = runRaceDetailInfo.getFinishFaceUrl(); | |
| 285 | + if (finishFaceUrl != null && finishFaceUrl.size() > 0) { | |
| 286 | + fragment.binding.includeRank.fiveRankPerson.initIconData(finishFaceUrl); | |
| 287 | + } | |
| 288 | + //设置第一名昵称 | |
| 289 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getFirstName())) { | |
| 290 | + fragment.binding.includeRank.tvKingNickName.setText(runRaceDetailInfo.getFirstName()); | |
| 291 | + } | |
| 292 | + } else { | |
| 293 | + fragment.binding.includeRank.llRankRoot.setVisibility(View.GONE); | |
| 294 | + | |
| 295 | + } | |
| 296 | + //设置路线描述 | |
| 297 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getDescription())) { | |
| 298 | + fragment.binding.includeStreetIntroduce.tvStreetIntroduce.setText(runRaceDetailInfo.getDescription()); | |
| 299 | + } | |
| 300 | + //设置路线介绍的图片 | |
| 301 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getRoadmap())) { | |
| 302 | + //设置路线图 | |
| 303 | + GlideApp.with(getContext()).load(runRaceDetailInfo.getRoadmap()).into(fragment.binding.includeStreetIntroduce.ivRoadMao); | |
| 304 | + | |
| 305 | + } | |
| 306 | + | |
| 307 | + //开始按钮点击事件(用户进行滑动滑动) | |
| 308 | + fragment.binding.rlScrollViewStartBtn.setVisibility(View.GONE); | |
| 309 | + //查看全部成绩点击事件 | |
| 310 | + fragment.binding.includePersonScore.checkAllCord.setOnClickListener(v -> { | |
| 311 | + RaceRecordActivity.newInstance(fragment.getActivity(), runRaceDetailInfo.getTitle()); | |
| 312 | + }); | |
| 313 | + | |
| 314 | + fragment.binding.includeStreet.fiveJoinPerson.setOnClickListener(v -> { | |
| 315 | + TakePartActivity.newInstance(fragment.getActivity()); | |
| 316 | + }); | |
| 317 | + //返回按钮 | |
| 318 | + fragment.binding.ivBack.setOnClickListener(new View.OnClickListener() { | |
| 319 | + @Override | |
| 320 | + public void onClick(View view) { | |
| 321 | + if (fragment.getActivity() == null) { | |
| 322 | + return; | |
| 323 | + } | |
| 324 | + fragment.getActivity().finish(); | |
| 325 | + } | |
| 326 | + }); | |
| 327 | + //todo 查看排行榜点击 | |
| 328 | + fragment.binding.includeRank.tvCatAllRank.setOnClickListener(new View.OnClickListener() { | |
| 329 | + @Override | |
| 330 | + public void onClick(View view) { | |
| 331 | + ARouter.getInstance().build("/web/WebViewColorActivity") | |
| 332 | + .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html" + "?sid=" + CommonInfo.getUserId(fragment.getActivity()) + "&eventId=" + CommonInfo.getStreetId(fragment.getActivity())) | |
| 333 | + .withString("title", "排行榜") | |
| 334 | + .navigation(fragment.getActivity()); | |
| 335 | + } | |
| 336 | + }); | |
| 337 | + } | |
| 338 | + } | |
| 339 | +} | |
| 0 | 340 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| ... | ... | @@ -14,6 +14,7 @@ import android.support.v4.content.ContextCompat; |
| 14 | 14 | import android.text.TextUtils; |
| 15 | 15 | import android.util.Log; |
| 16 | 16 | import android.view.View; |
| 17 | +import android.view.ViewGroup; | |
| 17 | 18 | import android.widget.LinearLayout; |
| 18 | 19 | import android.widget.Toast; |
| 19 | 20 | |
| ... | ... | @@ -57,6 +58,7 @@ import com.baidu.trace.model.SortType; |
| 57 | 58 | import com.cnlive.libs.base.logic.Event; |
| 58 | 59 | import com.cnlive.libs.base.logic.callback.FailureCallback; |
| 59 | 60 | import com.cnlive.libs.base.logic.callback.SuccessCallback; |
| 61 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 60 | 62 | import com.cnlive.moudle.pedometer.commonInfo.CollCommonInfo; |
| 61 | 63 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| 62 | 64 | import com.cnlive.moudle.pedometer.model.Constant; |
| ... | ... | @@ -83,6 +85,7 @@ import com.cnlive.moudle.pedometer.utils.TimeUtil; |
| 83 | 85 | import com.cnlive.strike.application.GlideApp; |
| 84 | 86 | import com.example.moudle_pedometer.R; |
| 85 | 87 | import com.hannesdorfmann.mosby3.mvp.MvpView; |
| 88 | +import com.qmuiteam.qmui.util.QMUIStatusBarHelper; | |
| 86 | 89 | import com.sothree.slidinguppanel.SlidingUpPanelLayout; |
| 87 | 90 | |
| 88 | 91 | import java.io.File; |
| ... | ... | @@ -242,6 +245,24 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 242 | 245 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 243 | 246 | @Override |
| 244 | 247 | public void onPanelSlide(View panel, float slideOffset) { |
| 248 | + //设置顶层卡片特效 | |
| 249 | + if (slideOffset > 0.7) { | |
| 250 | + double alpha = (255 / (1 - 0.6)) * (slideOffset - 0.6); | |
| 251 | + if (alpha > 60) { | |
| 252 | + fragment.binding.flTop.getBackground().setAlpha((int) alpha); | |
| 253 | + fragment.binding.flTop.setVisibility(View.VISIBLE); | |
| 254 | + QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | |
| 255 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | |
| 256 | + | |
| 257 | + } | |
| 258 | + } else { | |
| 259 | + if (fragment.binding.flTop.getVisibility() == View.VISIBLE) { | |
| 260 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 261 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 262 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 263 | + } | |
| 264 | + } | |
| 265 | + //设置卡片缩放特效 | |
| 245 | 266 | if (slideOffset >= 0 && slideOffset <= 1) { |
| 246 | 267 | int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); |
| 247 | 268 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| ... | ... | @@ -281,6 +302,46 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 281 | 302 | |
| 282 | 303 | @Override |
| 283 | 304 | public void onPanelStateChanged(View panel, SlidingUpPanelLayout.PanelState previousState, SlidingUpPanelLayout.PanelState newState) { |
| 305 | +// Log.e(TAG, "previousState: " + previousState + ",newState:" + newState); | |
| 306 | + if (previousState == SlidingUpPanelLayout.PanelState.ANCHORED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { | |
| 307 | + if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { | |
| 308 | + QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | |
| 309 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | |
| 310 | + fragment.binding.flTop.setVisibility(View.VISIBLE); | |
| 311 | + | |
| 312 | + } | |
| 313 | + } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.EXPANDED) { | |
| 314 | + | |
| 315 | + if (fragment.binding.flTop.getVisibility() != View.VISIBLE) { | |
| 316 | + QMUIStatusBarHelper.setStatusBarDarkMode(fragment.getActivity()); | |
| 317 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.run_main_bg), 0); | |
| 318 | + fragment.binding.flTop.setVisibility(View.VISIBLE); | |
| 319 | + | |
| 320 | + } | |
| 321 | + } else if (previousState == SlidingUpPanelLayout.PanelState.EXPANDED && newState == SlidingUpPanelLayout.PanelState.DRAGGING) { | |
| 322 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 323 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 324 | + if (fragment.binding.flTop.getVisibility() != View.GONE) { | |
| 325 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 326 | + } | |
| 327 | + } else if (previousState == SlidingUpPanelLayout.PanelState.DRAGGING && newState == SlidingUpPanelLayout.PanelState.ANCHORED) { | |
| 328 | + QMUIStatusBarHelper.setStatusBarLightMode(fragment.getActivity()); | |
| 329 | + StatusBarUtil2.setColor(fragment.getActivity(), getContext().getResources().getColor(R.color.white), 0); | |
| 330 | + if (fragment.binding.flTop.getVisibility() != View.GONE) { | |
| 331 | + fragment.binding.flTop.setVisibility(View.GONE); | |
| 332 | + } | |
| 333 | + } | |
| 334 | + | |
| 335 | + } | |
| 336 | + }); | |
| 337 | + //卡片滑动上层标题 | |
| 338 | + fragment.binding.llTopBack.setOnClickListener(new View.OnClickListener() { | |
| 339 | + @Override | |
| 340 | + public void onClick(View view) { | |
| 341 | + if (getContext() == null) { | |
| 342 | + return; | |
| 343 | + } | |
| 344 | + fragment.getActivity().finish(); | |
| 284 | 345 | } |
| 285 | 346 | }); |
| 286 | 347 | /*************************设置相关页面数据***************************/ |
| ... | ... | @@ -293,9 +354,9 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 293 | 354 | fragment.binding.includeStreet.tvRaceTitle.setText(runRaceDetailInfo.getTitle()); |
| 294 | 355 | //根据标题字数动态设置卡片高度 |
| 295 | 356 | if (runRaceDetailInfo.getTitle().length() > 19) { |
| 296 | - fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 149)); | |
| 357 | + fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 200)); | |
| 297 | 358 | } else { |
| 298 | - fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 141)); | |
| 359 | + fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(getContext(), 181)); | |
| 299 | 360 | } |
| 300 | 361 | fragment.binding.slidingLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED); |
| 301 | 362 | } |
| ... | ... | @@ -317,21 +378,21 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 317 | 378 | fragment.binding.includeStreet.tvEndAddr.setText(runRaceDetailInfo.getEndLocation()); |
| 318 | 379 | } |
| 319 | 380 | //设置起始报名时间 |
| 320 | - if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy-MM-dd"))) { | |
| 321 | - fragment.binding.includeStreet.tvSignUpStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy-MM-dd")); | |
| 381 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy.MM.dd"))) { | |
| 382 | + fragment.binding.includeStreet.tvSignUpStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_start_time(), "yyyy.MM.dd")); | |
| 322 | 383 | |
| 323 | 384 | } |
| 324 | 385 | //设置终止报名时间 |
| 325 | - if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy-MM-dd"))) { | |
| 326 | - fragment.binding.includeStreet.tvSignUpEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy-MM-dd")); | |
| 386 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy.MM.dd"))) { | |
| 387 | + fragment.binding.includeStreet.tvSignUpEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getSign_up_end_time(), "yyyy.MM.dd")); | |
| 327 | 388 | } |
| 328 | 389 | //设置活动开始时间 |
| 329 | - if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy-MM-dd"))) { | |
| 330 | - fragment.binding.includeStreet.tvActiveStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy-MM-dd")); | |
| 390 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy.MM.dd"))) { | |
| 391 | + fragment.binding.includeStreet.tvActiveStartTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getStart_time(), "yyyy.MM.dd")); | |
| 331 | 392 | } |
| 332 | 393 | //设置活动结束时间 |
| 333 | - if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy-MM-dd"))) { | |
| 334 | - fragment.binding.includeStreet.tvActiveEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy-MM-dd")); | |
| 394 | + if (!TextUtils.isEmpty(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd"))) { | |
| 395 | + fragment.binding.includeStreet.tvActiveEndTime.setText(TimeUtil.getStampToTime(runRaceDetailInfo.getEnd_time(), "yyyy.MM.dd")); | |
| 335 | 396 | } |
| 336 | 397 | //设置活动类型 |
| 337 | 398 | if (!TextUtils.isEmpty(runRaceDetailInfo.getEventType())) { |
| ... | ... | @@ -582,7 +643,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { |
| 582 | 643 | @Override |
| 583 | 644 | public void onClick(View view) { |
| 584 | 645 | ARouter.getInstance().build("/web/WebViewColorActivity") |
| 585 | - .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html"+"?sid="+CommonInfo.getUserId(fragment.getActivity())+"&eventId="+CommonInfo.getStreetId(fragment.getActivity())) | |
| 646 | + .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html" + "?sid=" + CommonInfo.getUserId(fragment.getActivity()) + "&eventId=" + CommonInfo.getStreetId(fragment.getActivity())) | |
| 586 | 647 | .withString("title", "排行榜") |
| 587 | 648 | .navigation(fragment.getActivity()); |
| 588 | 649 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/OnGoingActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.activity; | |
| 2 | + | |
| 3 | +import com.cnlive.libs.base.ui.QMUIFragmentActivity; | |
| 4 | +import com.example.moudle_pedometer.R; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * 进行中的活动点击事件 | |
| 8 | + */ | |
| 9 | +public class OnGoingActivity extends QMUIFragmentActivity { | |
| 10 | + @Override | |
| 11 | + protected int getContextViewId() { | |
| 12 | + return R.id.fragment_ongoing; | |
| 13 | + } | |
| 14 | +} | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/OnGoingFragment.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.fragment; | |
| 2 | + | |
| 3 | +import android.os.Bundle; | |
| 4 | +import android.support.annotation.Nullable; | |
| 5 | +import android.view.View; | |
| 6 | + | |
| 7 | +import com.cnlive.libs.base.ui.QMUIFragment; | |
| 8 | +import com.cnlive.moudle.pedometer.frame.presenter.OnGoingFragmentPresenter; | |
| 9 | +import com.cnlive.moudle.pedometer.frame.view.OnGoingFragmentView; | |
| 10 | +import com.example.moudle_pedometer.databinding.FragmentRunRaceDetailBinding; | |
| 11 | + | |
| 12 | +public class OnGoingFragment extends QMUIFragment<OnGoingFragmentView, OnGoingFragmentPresenter, FragmentRunRaceDetailBinding> { | |
| 13 | + @Override | |
| 14 | + protected int getToolbarId() { | |
| 15 | + return 0; | |
| 16 | + } | |
| 17 | + | |
| 18 | + @Override | |
| 19 | + public String getTitle() { | |
| 20 | + return null; | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + protected int getLayoutId() { | |
| 25 | + return 0; | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | |
| 30 | + super.onViewCreated(view, savedInstanceState); | |
| 31 | + } | |
| 32 | +} | ... | ... |
moudle_pedometer/src/main/res/drawable-hdpi/icon_run_white_back.png
0 → 100644
542 Bytes
moudle_pedometer/src/main/res/drawable-xhdpi/icon_run_white_back.png
0 → 100644
705 Bytes
moudle_pedometer/src/main/res/drawable-xxhdpi/icon_run_white_back.png
0 → 100644
1.17 KB
moudle_pedometer/src/main/res/layout/fragment_run_race_detail.xml
| ... | ... | @@ -72,6 +72,7 @@ |
| 72 | 72 | android:id="@+id/scrollView" |
| 73 | 73 | android:layout_width="match_parent" |
| 74 | 74 | android:layout_height="match_parent" |
| 75 | + android:layout_marginTop="40dp" | |
| 75 | 76 | android:scrollbars="none"> |
| 76 | 77 | |
| 77 | 78 | <LinearLayout |
| ... | ... | @@ -141,6 +142,40 @@ |
| 141 | 142 | android:visibility="gone" /> |
| 142 | 143 | |
| 143 | 144 | </RelativeLayout> |
| 145 | + | |
| 146 | + <FrameLayout | |
| 147 | + android:id="@+id/fl_top" | |
| 148 | + android:layout_width="match_parent" | |
| 149 | + android:layout_height="40dp" | |
| 150 | + android:layout_gravity="top" | |
| 151 | + android:background="@color/run_main_bg" | |
| 152 | + android:gravity="center" | |
| 153 | + android:visibility="gone"> | |
| 154 | + | |
| 155 | + <LinearLayout | |
| 156 | + android:id="@+id/ll_top_back" | |
| 157 | + android:layout_width="wrap_content" | |
| 158 | + android:layout_height="match_parent" | |
| 159 | + android:layout_gravity="center_vertical" | |
| 160 | + android:gravity="center" | |
| 161 | + android:padding="10dp"> | |
| 162 | + | |
| 163 | + <ImageView | |
| 164 | + android:layout_width="12dp" | |
| 165 | + android:layout_height="20dp" | |
| 166 | + android:background="@drawable/icon_run_white_back" /> | |
| 167 | + </LinearLayout> | |
| 168 | + | |
| 169 | + <TextView | |
| 170 | + android:layout_width="wrap_content" | |
| 171 | + android:layout_height="wrap_content" | |
| 172 | + android:layout_gravity="center" | |
| 173 | + android:text="路线详情" | |
| 174 | + android:textColor="@color/white" | |
| 175 | + android:textSize="18sp" | |
| 176 | + /> | |
| 177 | + </FrameLayout> | |
| 178 | + | |
| 144 | 179 | <com.cnlive.strike.ui.widget.UIEmptyView |
| 145 | 180 | android:id="@+id/empty_layout" |
| 146 | 181 | android:layout_width="match_parent" | ... | ... |
moudle_pedometer/src/main/res/layout/layout_finish_running_route.xml
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="195dp" | |
| 12 | 12 | android:layout_marginTop="30dp" |
| 13 | 13 | android:background="@drawable/shape_10dp_white_raduis_bg" |
| 14 | 14 | android:orientation="vertical"> | ... | ... |
moudle_pedometer/src/main/res/layout/layout_run_detail_street.xml
| ... | ... | @@ -3,8 +3,7 @@ |
| 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" | |
| 7 | - android:background="@color/white"> | |
| 6 | + android:layout_height="wrap_content"> | |
| 8 | 7 | |
| 9 | 8 | <LinearLayout |
| 10 | 9 | android:id="@+id/ll_run_detail_street_root" |
| ... | ... | @@ -25,7 +24,7 @@ |
| 25 | 24 | android:layout_height="wrap_content" |
| 26 | 25 | android:layout_marginLeft="15dp" |
| 27 | 26 | android:layout_marginRight="15dp" |
| 28 | - android:background="@drawable/shape_left_right_10dp_white_raduis_bg" | |
| 27 | + android:background="@color/white" | |
| 29 | 28 | android:orientation="vertical"> |
| 30 | 29 | <!--活动标题--> |
| 31 | 30 | <TextView |
| ... | ... | @@ -33,7 +32,7 @@ |
| 33 | 32 | android:layout_width="wrap_content" |
| 34 | 33 | android:layout_height="wrap_content" |
| 35 | 34 | android:layout_marginLeft="10dp" |
| 36 | - android:layout_marginTop="10dp" | |
| 35 | + android:layout_marginTop="15dp" | |
| 37 | 36 | android:text="--" |
| 38 | 37 | android:textColor="@color/text_black" |
| 39 | 38 | android:textSize="18sp" |
| ... | ... | @@ -78,15 +77,18 @@ |
| 78 | 77 | android:textSize="15sp" /> |
| 79 | 78 | |
| 80 | 79 | </LinearLayout> |
| 80 | + | |
| 81 | + <View | |
| 82 | + android:layout_width="match_parent" | |
| 83 | + android:layout_height="1dp" | |
| 84 | + android:layout_marginLeft="35dp" | |
| 85 | + android:layout_marginTop="-5dp" | |
| 86 | + android:layout_marginRight="35dp" | |
| 87 | + android:layout_marginBottom="5dp" | |
| 88 | + android:background="@color/line" /> | |
| 81 | 89 | </LinearLayout> |
| 82 | 90 | |
| 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" /> | |
| 91 | + | |
| 90 | 92 | <!--按钮--> |
| 91 | 93 | <RelativeLayout |
| 92 | 94 | android:id="@+id/rl_start_btn" |
| ... | ... | @@ -129,6 +131,8 @@ |
| 129 | 131 | android:layout_marginRight="15dp" |
| 130 | 132 | android:background="@color/white" |
| 131 | 133 | android:orientation="vertical"> |
| 134 | + | |
| 135 | + | |
| 132 | 136 | <!--起点--> |
| 133 | 137 | <LinearLayout |
| 134 | 138 | android:layout_width="match_parent" |
| ... | ... | @@ -242,7 +246,7 @@ |
| 242 | 246 | android:layout_width="wrap_content" |
| 243 | 247 | android:layout_height="match_parent" |
| 244 | 248 | android:layout_marginLeft="5dp" |
| 245 | - android:text="——" | |
| 249 | + android:text="一" | |
| 246 | 250 | android:textColor="@color/text_black" |
| 247 | 251 | android:textSize="15sp" /> |
| 248 | 252 | |
| ... | ... | @@ -304,7 +308,7 @@ |
| 304 | 308 | android:layout_width="wrap_content" |
| 305 | 309 | android:layout_height="match_parent" |
| 306 | 310 | android:layout_marginLeft="5dp" |
| 307 | - android:text="——" | |
| 311 | + android:text="一" | |
| 308 | 312 | android:textColor="@color/text_black" |
| 309 | 313 | android:textSize="15sp" /> |
| 310 | 314 | ... | ... |
moudle_pedometer/src/main/res/values/ids.xml