Commit afa347fdad53725e18f69b29fb145c682293cad4
Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/ModulePedometer
Showing
32 changed files
with
763 additions
and
120 deletions
.idea/gradle.xml
| @@ -3,9 +3,6 @@ | @@ -3,9 +3,6 @@ | ||
| 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> | ||
| 9 | <option name="distributionType" value="DEFAULT_WRAPPED" /> | 6 | <option name="distributionType" value="DEFAULT_WRAPPED" /> |
| 10 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> | 7 | <option name="externalProjectPath" value="$PROJECT_DIR$" /> |
| 11 | <option name="modules"> | 8 | <option name="modules"> |
config.gradle
moudle_pedometer/src/main/AndroidManifest.xml
| @@ -107,6 +107,9 @@ | @@ -107,6 +107,9 @@ | ||
| 107 | <activity | 107 | <activity |
| 108 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity" | 108 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity" |
| 109 | android:process=":step" /> | 109 | android:process=":step" /> |
| 110 | + <activity | ||
| 111 | + android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" | ||
| 112 | + android:process=":step" /> | ||
| 110 | </application> | 113 | </application> |
| 111 | 114 | ||
| 112 | </manifest> | 115 | </manifest> |
| 113 | \ No newline at end of file | 116 | \ No newline at end of file |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RunningFinishFragmetPresenter.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.frame.presenter; | ||
| 2 | + | ||
| 3 | +import com.cnlive.moudle.pedometer.frame.view.RunningFinishFragmentView; | ||
| 4 | +import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | ||
| 5 | + | ||
| 6 | +public class RunningFinishFragmetPresenter extends MvpBasePresenter<RunningFinishFragmentView> { | ||
| 7 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/presenter/RunningMapFragmentPresenter.java
| @@ -149,7 +149,6 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | @@ -149,7 +149,6 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | ||
| 149 | public void onHistoryTrackCallback(HistoryTrackResponse response) { | 149 | public void onHistoryTrackCallback(HistoryTrackResponse response) { |
| 150 | super.onHistoryTrackCallback(response); | 150 | super.onHistoryTrackCallback(response); |
| 151 | int total = response.getTotal(); | 151 | int total = response.getTotal(); |
| 152 | - Log.e(TAG, "onHistoryTrackCallback: total" + total + "数量"); | ||
| 153 | 152 | ||
| 154 | if (StatusCodes.SUCCESS != response.getStatus()) { | 153 | if (StatusCodes.SUCCESS != response.getStatus()) { |
| 155 | Toast.makeText(context, "获取轨迹失败!" + response.getStatus(), Toast.LENGTH_SHORT).show(); | 154 | Toast.makeText(context, "获取轨迹失败!" + response.getStatus(), Toast.LENGTH_SHORT).show(); |
| @@ -278,25 +277,6 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | @@ -278,25 +277,6 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | ||
| 278 | @Override | 277 | @Override |
| 279 | public void onReceiveLocation(TraceLocation traceLocation) { | 278 | public void onReceiveLocation(TraceLocation traceLocation) { |
| 280 | super.onReceiveLocation(traceLocation); | 279 | super.onReceiveLocation(traceLocation); |
| 281 | - Log.e(TAG, "onReceiveLocation"); | ||
| 282 | - Toast.makeText(context, "onReceiveLocation", Toast.LENGTH_SHORT).show(); | ||
| 283 | - | ||
| 284 | - Log.e(TAG, "onReceiveLocation"); | ||
| 285 | - if (traceLocation != null) { | ||
| 286 | - realTimePoints.add(new LatLng(traceLocation.getLatitude(), traceLocation.getLongitude())); | ||
| 287 | - } | ||
| 288 | - Log.e(TAG, "onReceiveLocation: size:" + realTimePoints.size()); | ||
| 289 | - if (realTimePoints.size() > 2) { | ||
| 290 | - if (getView() != null) { | ||
| 291 | - if (realTimeOverlay == null) { | ||
| 292 | - realTimeOverlay = MyMapUtil.drawMapLine(context, getView().baiduMap, realTimePoints, R.color.black); | ||
| 293 | - } else { | ||
| 294 | - realTimeOverlay.remove(); | ||
| 295 | - realTimeOverlay = MyMapUtil.drawMapLine(context, getView().baiduMap, realTimePoints, R.color.black); | ||
| 296 | - | ||
| 297 | - } | ||
| 298 | - } | ||
| 299 | - } | ||
| 300 | } | 280 | } |
| 301 | }; | 281 | }; |
| 302 | //查询实时轨迹 | 282 | //查询实时轨迹 |
| @@ -356,12 +336,10 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | @@ -356,12 +336,10 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter<RunningMapFrag | ||
| 356 | @Override | 336 | @Override |
| 357 | public void onMonitoredStatusCallback(MonitoredStatusResponse monitoredStatusResponse) { | 337 | public void onMonitoredStatusCallback(MonitoredStatusResponse monitoredStatusResponse) { |
| 358 | Toast.makeText(context, "围栏列表回调成功:onMonitoredStatusCallback", Toast.LENGTH_SHORT).show(); | 338 | Toast.makeText(context, "围栏列表回调成功:onMonitoredStatusCallback", Toast.LENGTH_SHORT).show(); |
| 359 | - Log.e(TAG, "onMonitoredStatusCallback: " + monitoredStatusResponse.getMonitoredStatusInfos().get(0).getMonitoredStatus()); | ||
| 360 | //查询监控对象状态响应结果 | 339 | //查询监控对象状态响应结果 |
| 361 | List<MonitoredStatusInfo> monitoredStatusInfos = monitoredStatusResponse.getMonitoredStatusInfos(); | 340 | List<MonitoredStatusInfo> monitoredStatusInfos = monitoredStatusResponse.getMonitoredStatusInfos(); |
| 362 | for (MonitoredStatusInfo monitoredStatusInfo : monitoredStatusInfos) { | 341 | for (MonitoredStatusInfo monitoredStatusInfo : monitoredStatusInfos) { |
| 363 | monitoredStatusInfo.getFenceId(); | 342 | monitoredStatusInfo.getFenceId(); |
| 364 | - | ||
| 365 | MonitoredStatus status = monitoredStatusInfo.getMonitoredStatus();//获取状态 | 343 | MonitoredStatus status = monitoredStatusInfo.getMonitoredStatus();//获取状态 |
| 366 | switch (status) { | 344 | switch (status) { |
| 367 | case in: | 345 | case in: |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunMainFragmentView.java
| @@ -5,6 +5,7 @@ import android.content.Intent; | @@ -5,6 +5,7 @@ import android.content.Intent; | ||
| 5 | import android.os.Handler; | 5 | import android.os.Handler; |
| 6 | import android.os.SystemClock; | 6 | import android.os.SystemClock; |
| 7 | import android.support.v4.content.ContextCompat; | 7 | import android.support.v4.content.ContextCompat; |
| 8 | +import android.text.TextUtils; | ||
| 8 | import android.util.Log; | 9 | import android.util.Log; |
| 9 | import android.view.MotionEvent; | 10 | import android.view.MotionEvent; |
| 10 | import android.view.View; | 11 | import android.view.View; |
| @@ -15,6 +16,8 @@ import com.cnlive.moudle.pedometer.model.Constant; | @@ -15,6 +16,8 @@ import com.cnlive.moudle.pedometer.model.Constant; | ||
| 15 | import com.cnlive.moudle.pedometer.model.MessageEvent; | 16 | import com.cnlive.moudle.pedometer.model.MessageEvent; |
| 16 | import com.cnlive.moudle.pedometer.service.StepService; | 17 | import com.cnlive.moudle.pedometer.service.StepService; |
| 17 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; | 18 | import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; |
| 19 | +import com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity; | ||
| 20 | +import com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity; | ||
| 18 | import com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity; | 21 | import com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity; |
| 19 | import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment; | 22 | import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment; |
| 20 | import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; | 23 | import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; |
| @@ -181,7 +184,7 @@ public class RunMainFragmentView implements MvpView { | @@ -181,7 +184,7 @@ public class RunMainFragmentView implements MvpView { | ||
| 181 | } | 184 | } |
| 182 | needWriteDataFlag = true; | 185 | needWriteDataFlag = true; |
| 183 | //将当前计时器时间戳写入数据库 | 186 | //将当前计时器时间戳写入数据库 |
| 184 | - setSQLPauseTime(); | 187 | + setSQLPauseTime(uid); |
| 185 | //为了点击时可以显示缩放动画,这里延迟一个动画时间进行(包括放大和缩小) | 188 | //为了点击时可以显示缩放动画,这里延迟一个动画时间进行(包括放大和缩小) |
| 186 | handler.postDelayed(new Runnable() { | 189 | handler.postDelayed(new Runnable() { |
| 187 | @Override | 190 | @Override |
| @@ -253,7 +256,7 @@ public class RunMainFragmentView implements MvpView { | @@ -253,7 +256,7 @@ public class RunMainFragmentView implements MvpView { | ||
| 253 | MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putLong("stepStartTime", 0); | 256 | MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putLong("stepStartTime", 0); |
| 254 | fragment.getActivity().stopService(new Intent(fragment.getActivity(), StepService.class)); | 257 | fragment.getActivity().stopService(new Intent(fragment.getActivity(), StepService.class)); |
| 255 | MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putString("userId", ""); | 258 | MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putString("userId", ""); |
| 256 | - | 259 | + RunningFinishActivity.startActivity(fragment.getActivity()); |
| 257 | // fragment.getActivity().finish(); | 260 | // fragment.getActivity().finish(); |
| 258 | } | 261 | } |
| 259 | }, "取消", new SelectDialog.DialogInterface() { | 262 | }, "取消", new SelectDialog.DialogInterface() { |
| @@ -311,7 +314,7 @@ public class RunMainFragmentView implements MvpView { | @@ -311,7 +314,7 @@ public class RunMainFragmentView implements MvpView { | ||
| 311 | StepService.mClient.stopGather(StepService.traceListener); | 314 | StepService.mClient.stopGather(StepService.traceListener); |
| 312 | } | 315 | } |
| 313 | //将当前计时器时间戳写入数据库 | 316 | //将当前计时器时间戳写入数据库 |
| 314 | - setSQLPauseTime(); | 317 | + setSQLPauseTime(uid); |
| 315 | needWriteDataFlag = false; | 318 | needWriteDataFlag = false; |
| 316 | ButtonAnimUtil.setViewHideZoomOut(fragment.binding.llPause); | 319 | ButtonAnimUtil.setViewHideZoomOut(fragment.binding.llPause); |
| 317 | handler.postDelayed(new Runnable() { | 320 | handler.postDelayed(new Runnable() { |
| @@ -365,16 +368,19 @@ public class RunMainFragmentView implements MvpView { | @@ -365,16 +368,19 @@ public class RunMainFragmentView implements MvpView { | ||
| 365 | }); | 368 | }); |
| 366 | } | 369 | } |
| 367 | 370 | ||
| 368 | - public void setSQLPauseTime() { | 371 | + public void setSQLPauseTime(String id) { |
| 369 | if (needWriteDataFlag) { | 372 | if (needWriteDataFlag) { |
| 370 | //将当前计时器时间戳写入数据库 | 373 | //将当前计时器时间戳写入数据库 |
| 371 | - UserStepEntity userStepEntity = StepUtil.getUserStepData(fragment.getActivity(), uid); | ||
| 372 | - if (userStepEntity != null) { | ||
| 373 | - userStepEntity.setPauseTimeStamp(fragment.binding.chronometer.getBase()); | ||
| 374 | - //设置当前暂停的时间戳 | ||
| 375 | - userStepEntity.setRecordTime(SystemClock.elapsedRealtime()); | ||
| 376 | - //更新数据 | ||
| 377 | - StepUtil.updateStepData(fragment.getActivity(), userStepEntity); | 374 | +// String id = MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).getString("userId", ""); |
| 375 | + if (!TextUtils.isEmpty(id)) { | ||
| 376 | + UserStepEntity userStepEntity = StepUtil.getUserStepData(fragment.getActivity(), uid); | ||
| 377 | + if (userStepEntity != null) { | ||
| 378 | + userStepEntity.setPauseTimeStamp(fragment.binding.chronometer.getBase()); | ||
| 379 | + //设置当前暂停的时间戳 | ||
| 380 | + userStepEntity.setRecordTime(SystemClock.elapsedRealtime()); | ||
| 381 | + //更新数据 | ||
| 382 | + StepUtil.updateStepData(fragment.getActivity(), userStepEntity); | ||
| 383 | + } | ||
| 378 | } | 384 | } |
| 379 | } | 385 | } |
| 380 | } | 386 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -108,7 +108,6 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -108,7 +108,6 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 108 | private LatLng startLatLng = new LatLng(39.934733, 116.308646);//起始点 | 108 | private LatLng startLatLng = new LatLng(39.934733, 116.308646);//起始点 |
| 109 | private List<LatLng> trackPoints; | 109 | private List<LatLng> trackPoints; |
| 110 | 110 | ||
| 111 | - | ||
| 112 | public RunRaceDetailFragmentView(RunRaceDetailFragment fragment) { | 111 | public RunRaceDetailFragmentView(RunRaceDetailFragment fragment) { |
| 113 | this.fragment = fragment; | 112 | this.fragment = fragment; |
| 114 | } | 113 | } |
| @@ -128,37 +127,45 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -128,37 +127,45 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 128 | //设置底部卡片第一次可滑动的位置 | 127 | //设置底部卡片第一次可滑动的位置 |
| 129 | fragment.binding.slidingLayout.setAnchorPoint(0.6f); | 128 | fragment.binding.slidingLayout.setAnchorPoint(0.6f); |
| 130 | //设置底部卡片初始位置 | 129 | //设置底部卡片初始位置 |
| 131 | - fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(fragment.getActivity(), 140)); | 130 | +// fragment.binding.slidingLayout.setPanelHeight(ScreenUtil.dip2px(fragment.getActivity(), 140)); |
| 131 | + fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | ||
| 132 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { | 132 | fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() { |
| 133 | @Override | 133 | @Override |
| 134 | public void onPanelSlide(View panel, float slideOffset) { | 134 | public void onPanelSlide(View panel, float slideOffset) { |
| 135 | - Log.e(TAG, "onPanelSlide: slideOffset" + slideOffset); | ||
| 136 | if (slideOffset >= 0 && slideOffset <= 1) { | 135 | if (slideOffset >= 0 && slideOffset <= 1) { |
| 137 | - int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 30) / 0.6); | 136 | + int leakWidth = (int) (ScreenUtil.dip2px(getContext(), 15) / 0.6); |
| 138 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); | 137 | LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); |
| 139 | - int current = (int) (leakWidth * slideOffset)+(ScreenUtil.dip2px(getContext(), 5)); | ||
| 140 | - | 138 | + int current = (int) (leakWidth * slideOffset); |
| 139 | +// Log.e(TAG, "current: " + current + ",leakWidth:" + leakWidth + ",ScreenUtil:" + ScreenUtil.dip2px(getContext(), 15)); | ||
| 140 | + if (slideOffset == 0) { | ||
| 141 | + layoutParams.setMargins(ScreenUtil.dip2px(getContext(), 15), 0, ScreenUtil.dip2px(getContext(), 15), 0); | ||
| 142 | + fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | ||
| 143 | + fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); | ||
| 144 | + } | ||
| 141 | if (leakWidth - ScreenUtil.dip2px(getContext(), current) <= ScreenUtil.dip2px(getContext(), 15)) { | 145 | if (leakWidth - ScreenUtil.dip2px(getContext(), current) <= ScreenUtil.dip2px(getContext(), 15)) { |
| 142 | if (leakWidth - ScreenUtil.dip2px(getContext(), current) >= 0) { | 146 | if (leakWidth - ScreenUtil.dip2px(getContext(), current) >= 0) { |
| 143 | layoutParams.setMargins(leakWidth - ScreenUtil.dip2px(getContext(), current), 0, leakWidth - ScreenUtil.dip2px(getContext(), current), 0); | 147 | layoutParams.setMargins(leakWidth - ScreenUtil.dip2px(getContext(), current), 0, leakWidth - ScreenUtil.dip2px(getContext(), current), 0); |
| 144 | } else { | 148 | } else { |
| 145 | layoutParams.setMargins(0, 0, 0, 0); | 149 | layoutParams.setMargins(0, 0, 0, 0); |
| 146 | } | 150 | } |
| 151 | + | ||
| 147 | fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | 152 | fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); |
| 148 | fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); | 153 | fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); |
| 149 | } | 154 | } |
| 155 | + | ||
| 150 | } | 156 | } |
| 151 | 157 | ||
| 152 | if (slideOffset == 0) { | 158 | if (slideOffset == 0) { |
| 153 | //在初始位置 | 159 | //在初始位置 |
| 154 | - fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | ||
| 155 | - LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT); | ||
| 156 | - layoutParams.setMargins(ScreenUtil.dip2px(getContext(),15), 0, ScreenUtil.dip2px(getContext(),15), 0); | ||
| 157 | - fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams); | ||
| 158 | - fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams); | 160 | + if (fragment.binding.includeStreet.rlStartBtn.getVisibility() == View.GONE) { |
| 161 | + fragment.binding.includeStreet.rlStartBtn.setVisibility(View.VISIBLE); | ||
| 162 | + } | ||
| 163 | + | ||
| 159 | } else { | 164 | } else { |
| 160 | //用户进行滑动 | 165 | //用户进行滑动 |
| 161 | - fragment.binding.includeStreet.rlStartBtn.setVisibility(View.GONE); | 166 | + if (fragment.binding.includeStreet.rlStartBtn.getVisibility() == View.VISIBLE) { |
| 167 | + fragment.binding.includeStreet.rlStartBtn.setVisibility(View.GONE); | ||
| 168 | + } | ||
| 162 | } | 169 | } |
| 163 | } | 170 | } |
| 164 | 171 | ||
| @@ -302,7 +309,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -302,7 +309,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 302 | //可选,设置是否需要地址描述 | 309 | //可选,设置是否需要地址描述 |
| 303 | option.setIsNeedLocationDescribe(true); | 310 | option.setIsNeedLocationDescribe(true); |
| 304 | //可选,设置是否需要设备方向结果 | 311 | //可选,设置是否需要设备方向结果 |
| 305 | - option.setNeedDeviceDirect(true); | 312 | + option.setNeedDeviceDirect(false); |
| 306 | //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者 | 313 | //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者 |
| 307 | option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT); | 314 | option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT); |
| 308 | mLocClient.setLocOption(option); | 315 | mLocClient.setLocOption(option); |
| @@ -610,11 +617,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -610,11 +617,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 610 | return; | 617 | return; |
| 611 | } | 618 | } |
| 612 | } | 619 | } |
| 613 | - mCurrentAccracy = location.getRadius(); | ||
| 614 | followMyLocation = new MyLocationData.Builder() | 620 | followMyLocation = new MyLocationData.Builder() |
| 615 | .accuracy(location.getRadius()) | 621 | .accuracy(location.getRadius()) |
| 616 | // 此处设置开发者获取到的方向信息,顺时针0-360 | 622 | // 此处设置开发者获取到的方向信息,顺时针0-360 |
| 617 | - .direction(mCurrentDirection).latitude(location.getLatitude()) | 623 | + .direction(location.getDirection()).latitude(location.getLatitude()) |
| 618 | .longitude(location.getLongitude()).build(); | 624 | .longitude(location.getLongitude()).build(); |
| 619 | if (followMyLocation == null || followMyLocation.latitude == 0 || followMyLocation.longitude == 0) { | 625 | if (followMyLocation == null || followMyLocation.latitude == 0 || followMyLocation.longitude == 0) { |
| 620 | return; | 626 | return; |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningFinishFragmentView.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.frame.view; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | + | ||
| 5 | +import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment; | ||
| 6 | +import com.cnlive.moudle.pedometer.ui.fragment.RunningMapFragment; | ||
| 7 | +import com.hannesdorfmann.mosby3.mvp.MvpView; | ||
| 8 | + | ||
| 9 | +public class RunningFinishFragmentView implements MvpView { | ||
| 10 | + private RunningFinishFragment fragment; | ||
| 11 | + | ||
| 12 | + public RunningFinishFragmentView(RunningFinishFragment fragment) { | ||
| 13 | + this.fragment = fragment; | ||
| 14 | + } | ||
| 15 | + | ||
| 16 | + public Context getContext() { | ||
| 17 | + return fragment == null ? null : fragment.getActivity(); | ||
| 18 | + } | ||
| 19 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningMapFragmentView.java
| @@ -23,6 +23,7 @@ import com.baidu.mapapi.map.BaiduMap; | @@ -23,6 +23,7 @@ import com.baidu.mapapi.map.BaiduMap; | ||
| 23 | import com.baidu.mapapi.map.BitmapDescriptor; | 23 | import com.baidu.mapapi.map.BitmapDescriptor; |
| 24 | import com.baidu.mapapi.map.BitmapDescriptorFactory; | 24 | import com.baidu.mapapi.map.BitmapDescriptorFactory; |
| 25 | import com.baidu.mapapi.map.MapStatus; | 25 | import com.baidu.mapapi.map.MapStatus; |
| 26 | +import com.baidu.mapapi.map.MapStatusUpdateFactory; | ||
| 26 | import com.baidu.mapapi.map.MapView; | 27 | import com.baidu.mapapi.map.MapView; |
| 27 | import com.baidu.mapapi.map.MarkerOptions; | 28 | import com.baidu.mapapi.map.MarkerOptions; |
| 28 | import com.baidu.mapapi.map.MyLocationConfiguration; | 29 | import com.baidu.mapapi.map.MyLocationConfiguration; |
| @@ -131,14 +132,19 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { | @@ -131,14 +132,19 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { | ||
| 131 | baiduMap.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() { | 132 | baiduMap.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() { |
| 132 | @Override | 133 | @Override |
| 133 | public void onMapLoaded() { | 134 | public void onMapLoaded() { |
| 135 | + //自动计算地图缩放 | ||
| 136 | + MapStatus.Builder builder = new MapStatus.Builder(); | ||
| 137 | + builder.target(MyMapUtil.getCenterZoomPosition(trackPoints)); | ||
| 138 | + builder.zoom(MyMapUtil.getZoom(trackPoints)); | ||
| 139 | + baiduMap.animateMapStatus(MapStatusUpdateFactory.newMapStatus(builder.build())); | ||
| 134 | if (isFirstLoadMap) { | 140 | if (isFirstLoadMap) { |
| 135 | isFirstLoadMap = false; | 141 | isFirstLoadMap = false; |
| 136 | new Handler().postDelayed(new Runnable() { | 142 | new Handler().postDelayed(new Runnable() { |
| 137 | @Override | 143 | @Override |
| 138 | public void run() { | 144 | public void run() { |
| 139 | - MyMapUtil.drawMapLine(getContext(), baiduMap, trackPoints, R.color.green); | 145 | + MyMapUtil.drawMapLine(getContext(), baiduMap, trackPoints, R.color.green_50); |
| 140 | } | 146 | } |
| 141 | - }, 3000); | 147 | + }, 1500); |
| 142 | } | 148 | } |
| 143 | } | 149 | } |
| 144 | }); | 150 | }); |
| @@ -194,7 +200,6 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { | @@ -194,7 +200,6 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { | ||
| 194 | 200 | ||
| 195 | @Override | 201 | @Override |
| 196 | public void onReceiveLocation(BDLocation location) { | 202 | public void onReceiveLocation(BDLocation location) { |
| 197 | - Toast.makeText(getContext(), "aa", Toast.LENGTH_SHORT).show(); | ||
| 198 | Log.e(TAG, "onReceiveLocation: 状态" + location.getGpsAccuracyStatus()); | 203 | Log.e(TAG, "onReceiveLocation: 状态" + location.getGpsAccuracyStatus()); |
| 199 | // map view 销毁后不在处理新接收的位置 | 204 | // map view 销毁后不在处理新接收的位置 |
| 200 | if (location == null || mMapView == null) { | 205 | if (location == null || mMapView == null) { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunLineActivity.java
| @@ -6,6 +6,7 @@ import android.os.Bundle; | @@ -6,6 +6,7 @@ import android.os.Bundle; | ||
| 6 | import com.cnlive.libs.base.util.StatusBarUtil; | 6 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 7 | import com.cnlive.libs.base.util.StatusBarUtil2; | 7 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 8 | import com.cnlive.moudle.pedometer.ui.fragment.RunLineFragment; | 8 | import com.cnlive.moudle.pedometer.ui.fragment.RunLineFragment; |
| 9 | +import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment; | ||
| 9 | import com.example.moudle_pedometer.R; | 10 | import com.example.moudle_pedometer.R; |
| 10 | 11 | ||
| 11 | /** | 12 | /** |
| @@ -22,5 +23,6 @@ public class RunLineActivity extends AppCompatActivity { | @@ -22,5 +23,6 @@ public class RunLineActivity extends AppCompatActivity { | ||
| 22 | setContentView(R.layout.activity_run_line); | 23 | setContentView(R.layout.activity_run_line); |
| 23 | 24 | ||
| 24 | getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit(); | 25 | getSupportFragmentManager().beginTransaction().replace(R.id.run_line_container, new RunLineFragment()).commit(); |
| 26 | + | ||
| 25 | } | 27 | } |
| 26 | } | 28 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
| @@ -34,7 +34,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | @@ -34,7 +34,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | ||
| 34 | 34 | ||
| 35 | @Override | 35 | @Override |
| 36 | protected int getContextViewId() { | 36 | protected int getContextViewId() { |
| 37 | - return R.id.fragment_run_trace_detail; | 37 | + return R.id.fragment_finish_run_map; |
| 38 | } | 38 | } |
| 39 | 39 | ||
| 40 | @Override | 40 | @Override |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunningFinishActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.activity; | ||
| 2 | + | ||
| 3 | +import android.app.Activity; | ||
| 4 | +import android.content.Intent; | ||
| 5 | +import android.os.Bundle; | ||
| 6 | +import android.support.annotation.Nullable; | ||
| 7 | + | ||
| 8 | +import com.alibaba.android.arouter.facade.annotation.Route; | ||
| 9 | +import com.cnlive.libs.base.ui.QMUIFragment; | ||
| 10 | +import com.cnlive.libs.base.ui.QMUIFragmentActivity; | ||
| 11 | +import com.cnlive.libs.base.util.StatusBarUtil2; | ||
| 12 | +import com.cnlive.moudle.pedometer.model.RunningMapBean; | ||
| 13 | +import com.cnlive.moudle.pedometer.ui.fragment.RunRaceDetailFragment; | ||
| 14 | +import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment; | ||
| 15 | +import com.example.moudle_pedometer.R; | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * 跑步结束 | ||
| 19 | + * | ||
| 20 | + * @author ShinnyYang | ||
| 21 | + */ | ||
| 22 | +@Route(path = "/moudle_pedometer/RunningFinishActivity") | ||
| 23 | +public class RunningFinishActivity extends QMUIFragmentActivity { | ||
| 24 | + | ||
| 25 | + @Override | ||
| 26 | + protected int getContextViewId() { | ||
| 27 | + return R.id.fragment_run_trace_detail; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + @Override | ||
| 31 | + protected void onCreate(Bundle savedInstanceState) { | ||
| 32 | + super.onCreate(savedInstanceState); | ||
| 33 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.run_main_bg), 0); | ||
| 34 | + addFragment(); | ||
| 35 | + | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + private void addFragment() { | ||
| 39 | + QMUIFragment fragment = new RunningFinishFragment(); | ||
| 40 | + getSupportFragmentManager().beginTransaction() | ||
| 41 | + .add(getContextViewId(), fragment, fragment.getClass().getSimpleName()) | ||
| 42 | + .addToBackStack(fragment.getClass().getSimpleName()) | ||
| 43 | + .commit(); | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { | ||
| 48 | + super.onActivityResult(requestCode, resultCode, data); | ||
| 49 | + if (resultCode == 1002) { | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public static void startActivity(Activity activity) { | ||
| 55 | + Intent intent = new Intent(activity, RunningFinishActivity.class); | ||
| 56 | + activity.startActivity(intent); | ||
| 57 | + } | ||
| 58 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunMainFragment.java
| @@ -3,6 +3,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | @@ -3,6 +3,7 @@ package com.cnlive.moudle.pedometer.ui.fragment; | ||
| 3 | import android.os.Bundle; | 3 | import android.os.Bundle; |
| 4 | import android.os.Handler; | 4 | import android.os.Handler; |
| 5 | import android.support.annotation.Nullable; | 5 | import android.support.annotation.Nullable; |
| 6 | +import android.text.TextUtils; | ||
| 6 | import android.util.Log; | 7 | import android.util.Log; |
| 7 | import android.view.View; | 8 | import android.view.View; |
| 8 | 9 | ||
| @@ -23,7 +24,7 @@ import org.greenrobot.eventbus.ThreadMode; | @@ -23,7 +24,7 @@ import org.greenrobot.eventbus.ThreadMode; | ||
| 23 | 24 | ||
| 24 | public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFragmentPresenter, FragmentRunMainBinding> { | 25 | public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFragmentPresenter, FragmentRunMainBinding> { |
| 25 | private final String TAG = "RunMainFragment"; | 26 | private final String TAG = "RunMainFragment"; |
| 26 | - | 27 | + private String userId = "yangshuai"; |
| 27 | 28 | ||
| 28 | @Override | 29 | @Override |
| 29 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | 30 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { |
| @@ -54,7 +55,9 @@ public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFr | @@ -54,7 +55,9 @@ public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFr | ||
| 54 | super.onPause(); | 55 | super.onPause(); |
| 55 | //记录当前计时器相关数据 | 56 | //记录当前计时器相关数据 |
| 56 | if (getMvpView() != null) { | 57 | if (getMvpView() != null) { |
| 57 | - getMvpView().setSQLPauseTime(); | 58 | + if (!TextUtils.isEmpty(userId)) { |
| 59 | + getMvpView().setSQLPauseTime(userId); | ||
| 60 | + } | ||
| 58 | } | 61 | } |
| 59 | } | 62 | } |
| 60 | 63 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunningFinishFragment.java
0 → 100644
| 1 | +package com.cnlive.moudle.pedometer.ui.fragment; | ||
| 2 | + | ||
| 3 | +import com.cnlive.libs.base.ui.QMUIFragment; | ||
| 4 | +import com.cnlive.moudle.pedometer.frame.presenter.RunningFinishFragmetPresenter; | ||
| 5 | +import com.cnlive.moudle.pedometer.frame.view.RunningFinishFragmentView; | ||
| 6 | +import com.example.moudle_pedometer.R; | ||
| 7 | +import com.example.moudle_pedometer.databinding.FragmentFinishRunMapBinding; | ||
| 8 | + | ||
| 9 | +public class RunningFinishFragment extends QMUIFragment<RunningFinishFragmentView, RunningFinishFragmetPresenter, FragmentFinishRunMapBinding> { | ||
| 10 | + @Override | ||
| 11 | + protected int getToolbarId() { | ||
| 12 | + return 0; | ||
| 13 | + } | ||
| 14 | + | ||
| 15 | + @Override | ||
| 16 | + public String getTitle() { | ||
| 17 | + return null; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + @Override | ||
| 21 | + protected int getLayoutId() { | ||
| 22 | + return R.layout.fragment_finish_run_map; | ||
| 23 | + } | ||
| 24 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/StepUtil.java
| 1 | package com.cnlive.moudle.pedometer.utils; | 1 | package com.cnlive.moudle.pedometer.utils; |
| 2 | 2 | ||
| 3 | import android.content.Context; | 3 | import android.content.Context; |
| 4 | +import android.text.TextUtils; | ||
| 4 | import android.util.Log; | 5 | import android.util.Log; |
| 5 | 6 | ||
| 6 | import com.cnlive.moudle.pedometer.model.Constant; | 7 | import com.cnlive.moudle.pedometer.model.Constant; |
| @@ -102,13 +103,17 @@ public class StepUtil { | @@ -102,13 +103,17 @@ public class StepUtil { | ||
| 102 | } | 103 | } |
| 103 | 104 | ||
| 104 | public static UserStepEntity getUserStepData(Context context, String uid) { | 105 | public static UserStepEntity getUserStepData(Context context, String uid) { |
| 105 | - DbCore.init(context, dbName); | ||
| 106 | - DbCore.getDaoSession().getUserStepEntityDao().detachAll(); | ||
| 107 | - DbCore.getDaoSession().clear(); | ||
| 108 | - String CURRENT_DATE = getTodayDate(); | ||
| 109 | - List<UserStepEntity> list = DbCore.getDaoSession().getUserStepEntityDao().queryBuilder().where(UserStepEntityDao.Properties.UserId.eq(uid), UserStepEntityDao.Properties.Date.eq(CURRENT_DATE)).list(); | ||
| 110 | - if (list != null && list.size() > 0) { | ||
| 111 | - return list.get(0); | 106 | + if (!TextUtils.isEmpty(uid)) { |
| 107 | + DbCore.init(context, dbName); | ||
| 108 | + DbCore.getDaoSession().getUserStepEntityDao().detachAll(); | ||
| 109 | + DbCore.getDaoSession().clear(); | ||
| 110 | + String CURRENT_DATE = getTodayDate(); | ||
| 111 | + List<UserStepEntity> list = DbCore.getDaoSession().getUserStepEntityDao().queryBuilder().where(UserStepEntityDao.Properties.UserId.eq(uid), UserStepEntityDao.Properties.Date.eq(CURRENT_DATE)).list(); | ||
| 112 | + if (list != null && list.size() > 0) { | ||
| 113 | + return list.get(0); | ||
| 114 | + } else { | ||
| 115 | + return null; | ||
| 116 | + } | ||
| 112 | } else { | 117 | } else { |
| 113 | return null; | 118 | return null; |
| 114 | } | 119 | } |
moudle_pedometer/src/main/res/drawable-hdpi/icon_run_route.png
0 → 100644
1.47 KB
moudle_pedometer/src/main/res/drawable-hdpi/icon_step.png
0 → 100644
1.52 KB
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_stop.png
0 → 100644
98 Bytes
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_button_stop.webp deleted
100644 → 0
No preview for this file type
moudle_pedometer/src/main/res/drawable/shape_circle_50_white.xml
0 → 100644
moudle_pedometer/src/main/res/drawable/shape_circle_gray.xml
0 → 100644
moudle_pedometer/src/main/res/drawable/shape_left_right_10dp_white_raduis_bg.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<shape xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 3 | + <solid android:color="@color/white" /> | ||
| 4 | + <corners | ||
| 5 | + android:topLeftRadius="10dp" | ||
| 6 | + android:topRightRadius="10dp" /> | ||
| 7 | +</shape> | ||
| 0 | \ No newline at end of file | 8 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/fragment_finish_run_map.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<layout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
| 4 | + | ||
| 5 | + <com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto" | ||
| 6 | + android:id="@+id/sliding_layout" | ||
| 7 | + android:layout_width="match_parent" | ||
| 8 | + android:layout_height="match_parent" | ||
| 9 | + android:gravity="bottom" | ||
| 10 | + sothree:umanoDragView="@+id/dragView" | ||
| 11 | + sothree:umanoFadeColor="@color/black_20" | ||
| 12 | + sothree:umanoOverlay="true" | ||
| 13 | + sothree:umanoPanelHeight="220dp" | ||
| 14 | + sothree:umanoParallaxOffset="100dp" | ||
| 15 | + sothree:umanoScrollableView="@+id/scrollView" | ||
| 16 | + sothree:umanoShadowHeight="0dp"> | ||
| 17 | + | ||
| 18 | + <!-- MAIN CONTENT --> | ||
| 19 | + <FrameLayout | ||
| 20 | + android:layout_width="match_parent" | ||
| 21 | + android:layout_height="match_parent"> | ||
| 22 | + | ||
| 23 | + <com.baidu.mapapi.map.MapView | ||
| 24 | + android:id="@+id/mapView" | ||
| 25 | + android:layout_width="match_parent" | ||
| 26 | + android:layout_height="match_parent"></com.baidu.mapapi.map.MapView> | ||
| 27 | + | ||
| 28 | + <FrameLayout | ||
| 29 | + android:layout_width="40dp" | ||
| 30 | + android:layout_height="40dp" | ||
| 31 | + android:layout_margin="10dp" | ||
| 32 | + android:background="@drawable/shape_circle_50_black"> | ||
| 33 | + | ||
| 34 | + <ImageView | ||
| 35 | + android:layout_width="10dp" | ||
| 36 | + android:layout_height="20dp" | ||
| 37 | + android:layout_gravity="center" | ||
| 38 | + android:background="@drawable/ic_white_back" /> | ||
| 39 | + </FrameLayout> | ||
| 40 | + | ||
| 41 | + <FrameLayout | ||
| 42 | + android:layout_width="40dp" | ||
| 43 | + android:layout_height="40dp" | ||
| 44 | + android:layout_gravity="right" | ||
| 45 | + android:layout_margin="10dp" | ||
| 46 | + android:background="@drawable/shape_circle_50_black"> | ||
| 47 | + | ||
| 48 | + <ImageView | ||
| 49 | + android:layout_width="15dp" | ||
| 50 | + android:layout_height="15dp" | ||
| 51 | + android:layout_gravity="center" | ||
| 52 | + android:background="@drawable/icon_share" /> | ||
| 53 | + </FrameLayout> | ||
| 54 | + <!----> | ||
| 55 | + | ||
| 56 | + | ||
| 57 | + </FrameLayout> | ||
| 58 | + | ||
| 59 | + <!-- SLIDING LAYOUT --> | ||
| 60 | + <FrameLayout | ||
| 61 | + android:id="@+id/dragView" | ||
| 62 | + android:layout_width="match_parent" | ||
| 63 | + android:layout_height="wrap_content" | ||
| 64 | + android:clickable="true" | ||
| 65 | + android:focusable="false" | ||
| 66 | + android:orientation="vertical"> | ||
| 67 | + | ||
| 68 | + <ScrollView | ||
| 69 | + android:id="@+id/scrollView" | ||
| 70 | + android:layout_width="match_parent" | ||
| 71 | + android:layout_height="wrap_content" | ||
| 72 | + android:layout_marginBottom="60dp" | ||
| 73 | + android:scrollbars="none"> | ||
| 74 | + | ||
| 75 | + <LinearLayout | ||
| 76 | + android:id="@+id/ll_root" | ||
| 77 | + android:layout_width="match_parent" | ||
| 78 | + android:layout_height="wrap_content" | ||
| 79 | + android:orientation="vertical"> | ||
| 80 | + <!--用户个人信息--> | ||
| 81 | + <include | ||
| 82 | + android:id="@+id/include_finish_user_info" | ||
| 83 | + layout="@layout/layout_finish_user_info" /> | ||
| 84 | + <!--总步数--> | ||
| 85 | + <include | ||
| 86 | + android:id="@+id/include_finish_step" | ||
| 87 | + layout="@layout/layout_finish_step" | ||
| 88 | + android:visibility="visible" /> | ||
| 89 | + <!--跑步路线--> | ||
| 90 | + <include | ||
| 91 | + android:id="@+id/include_finish_run_route" | ||
| 92 | + layout="@layout/layout_finish_running_route" | ||
| 93 | + android:visibility="visible" /> | ||
| 94 | + </LinearLayout> | ||
| 95 | + | ||
| 96 | + </ScrollView> | ||
| 97 | + <!--按钮--> | ||
| 98 | + <RelativeLayout | ||
| 99 | + android:id="@+id/rl_scrollView_startBtn" | ||
| 100 | + android:layout_width="match_parent" | ||
| 101 | + android:layout_height="40sp" | ||
| 102 | + android:layout_gravity="bottom" | ||
| 103 | + android:background="@color/green_round" | ||
| 104 | + android:tag="0"> | ||
| 105 | + | ||
| 106 | + <TextView | ||
| 107 | + android:id="@+id/tv_run_now" | ||
| 108 | + android:layout_width="wrap_content" | ||
| 109 | + android:layout_height="wrap_content" | ||
| 110 | + android:layout_centerInParent="true" | ||
| 111 | + android:tag="0" | ||
| 112 | + android:text="保存中" | ||
| 113 | + android:textColor="@color/white" | ||
| 114 | + android:textSize="18sp" /> | ||
| 115 | + | ||
| 116 | + | ||
| 117 | + </RelativeLayout> | ||
| 118 | + </FrameLayout> | ||
| 119 | + </com.sothree.slidinguppanel.SlidingUpPanelLayout> | ||
| 120 | + | ||
| 121 | + | ||
| 122 | +</layout> | ||
| 0 | \ No newline at end of file | 123 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/fragment_run_race_detail.xml
| @@ -8,9 +8,10 @@ | @@ -8,9 +8,10 @@ | ||
| 8 | android:layout_height="match_parent" | 8 | android:layout_height="match_parent" |
| 9 | android:gravity="bottom" | 9 | android:gravity="bottom" |
| 10 | sothree:umanoDragView="@+id/dragView" | 10 | sothree:umanoDragView="@+id/dragView" |
| 11 | + sothree:umanoFadeColor="@color/black_20" | ||
| 11 | sothree:umanoOverlay="true" | 12 | sothree:umanoOverlay="true" |
| 12 | - sothree:umanoPanelHeight="100dp" | ||
| 13 | - sothree:umanoParallaxOffset="100dp" | 13 | + sothree:umanoPanelHeight="142dp" |
| 14 | + sothree:umanoParallaxOffset="250dp" | ||
| 14 | sothree:umanoScrollableView="@+id/scrollView" | 15 | sothree:umanoScrollableView="@+id/scrollView" |
| 15 | sothree:umanoShadowHeight="0dp"> | 16 | sothree:umanoShadowHeight="0dp"> |
| 16 | 17 | ||
| @@ -60,14 +61,13 @@ | @@ -60,14 +61,13 @@ | ||
| 60 | android:id="@+id/dragView" | 61 | android:id="@+id/dragView" |
| 61 | android:layout_width="match_parent" | 62 | android:layout_width="match_parent" |
| 62 | android:layout_height="match_parent" | 63 | android:layout_height="match_parent" |
| 63 | - android:clickable="true" | ||
| 64 | - android:focusable="false" | ||
| 65 | - android:orientation="vertical"> | 64 | + android:clickable="false" |
| 65 | + android:focusable="false"> | ||
| 66 | 66 | ||
| 67 | <ScrollView | 67 | <ScrollView |
| 68 | android:id="@+id/scrollView" | 68 | android:id="@+id/scrollView" |
| 69 | android:layout_width="match_parent" | 69 | android:layout_width="match_parent" |
| 70 | - android:layout_height="wrap_content" | 70 | + android:layout_height="match_parent" |
| 71 | android:scrollbars="none"> | 71 | android:scrollbars="none"> |
| 72 | 72 | ||
| 73 | <LinearLayout | 73 | <LinearLayout |
| @@ -82,13 +82,13 @@ | @@ -82,13 +82,13 @@ | ||
| 82 | <!--成绩--> | 82 | <!--成绩--> |
| 83 | <include | 83 | <include |
| 84 | android:id="@+id/include_person_score" | 84 | android:id="@+id/include_person_score" |
| 85 | - android:visibility="gone" | ||
| 86 | - layout="@layout/layout_run_detail_person_score" /> | 85 | + layout="@layout/layout_run_detail_person_score" |
| 86 | + android:visibility="visible" /> | ||
| 87 | <!--排行--> | 87 | <!--排行--> |
| 88 | <include | 88 | <include |
| 89 | android:id="@+id/include_rank" | 89 | android:id="@+id/include_rank" |
| 90 | - android:visibility="gone" | ||
| 91 | - layout="@layout/layout_run_detail_rank" /> | 90 | + layout="@layout/layout_run_detail_rank" |
| 91 | + android:visibility="visible" /> | ||
| 92 | <!--路线介绍--> | 92 | <!--路线介绍--> |
| 93 | <include | 93 | <include |
| 94 | android:id="@+id/include_street_introduce" | 94 | android:id="@+id/include_street_introduce" |
moudle_pedometer/src/main/res/layout/layout_finish_running_route.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + android:layout_width="match_parent" | ||
| 4 | + android:layout_height="match_parent" | ||
| 5 | + android:layout_margin="10dp" | ||
| 6 | + android:background="@drawable/shape_10dp_white_raduis_bg" | ||
| 7 | + android:orientation="vertical"> | ||
| 8 | + <!--跑步路线--> | ||
| 9 | + <LinearLayout | ||
| 10 | + android:layout_width="match_parent" | ||
| 11 | + android:layout_height="wrap_content" | ||
| 12 | + android:layout_marginTop="10dp" | ||
| 13 | + android:gravity="bottom"> | ||
| 14 | + | ||
| 15 | + <ImageView | ||
| 16 | + android:layout_width="30dp" | ||
| 17 | + android:layout_height="30dp" | ||
| 18 | + android:layout_marginLeft="10dp" | ||
| 19 | + android:background="@drawable/icon_run_route" /> | ||
| 20 | + | ||
| 21 | + <TextView | ||
| 22 | + android:layout_width="wrap_content" | ||
| 23 | + android:layout_height="wrap_content" | ||
| 24 | + android:layout_marginBottom="1dp" | ||
| 25 | + android:text="跑步路线" | ||
| 26 | + android:textColor="@color/black" | ||
| 27 | + android:textSize="12sp" /> | ||
| 28 | + </LinearLayout> | ||
| 29 | + <!--起点--> | ||
| 30 | + <LinearLayout | ||
| 31 | + android:layout_width="match_parent" | ||
| 32 | + android:layout_height="wrap_content" | ||
| 33 | + android:layout_marginTop="10dp" | ||
| 34 | + android:gravity="center_vertical"> | ||
| 35 | + | ||
| 36 | + <View | ||
| 37 | + android:layout_width="10dp" | ||
| 38 | + android:layout_height="10dp" | ||
| 39 | + android:layout_marginLeft="15dp" | ||
| 40 | + android:background="@drawable/shape_circle_green" /> | ||
| 41 | + | ||
| 42 | + <TextView | ||
| 43 | + android:layout_width="wrap_content" | ||
| 44 | + android:layout_height="wrap_content" | ||
| 45 | + android:layout_marginLeft="10dp" | ||
| 46 | + android:text="@string/layout_street_start_point" | ||
| 47 | + android:textColor="@color/text_gray" | ||
| 48 | + android:textSize="14sp" /> | ||
| 49 | + | ||
| 50 | + <TextView | ||
| 51 | + android:layout_width="wrap_content" | ||
| 52 | + android:layout_height="wrap_content" | ||
| 53 | + android:layout_marginLeft="10dp" | ||
| 54 | + android:text="首都师范大学操场东门" | ||
| 55 | + android:textColor="@color/black" | ||
| 56 | + android:textSize="15sp" /> | ||
| 57 | + </LinearLayout> | ||
| 58 | + <!--竖线--> | ||
| 59 | + <View | ||
| 60 | + android:layout_width="1dp" | ||
| 61 | + android:layout_height="30dp" | ||
| 62 | + android:layout_marginLeft="19dp" | ||
| 63 | + android:layout_marginTop="-3dp" | ||
| 64 | + android:background="@color/vertical_line" /> | ||
| 65 | + <!--终点--> | ||
| 66 | + <LinearLayout | ||
| 67 | + android:layout_width="match_parent" | ||
| 68 | + android:layout_height="wrap_content" | ||
| 69 | + android:layout_marginTop="-3dp" | ||
| 70 | + android:gravity="center_vertical"> | ||
| 71 | + | ||
| 72 | + <View | ||
| 73 | + android:layout_width="10dp" | ||
| 74 | + android:layout_height="10dp" | ||
| 75 | + android:layout_marginLeft="15dp" | ||
| 76 | + android:background="@drawable/shape_circle_red" /> | ||
| 77 | + | ||
| 78 | + <TextView | ||
| 79 | + android:layout_width="wrap_content" | ||
| 80 | + android:layout_height="wrap_content" | ||
| 81 | + android:layout_marginLeft="10dp" | ||
| 82 | + android:text="@string/layout_street_end_point" | ||
| 83 | + android:textColor="@color/text_gray" | ||
| 84 | + android:textSize="14sp" /> | ||
| 85 | + | ||
| 86 | + <TextView | ||
| 87 | + android:layout_width="wrap_content" | ||
| 88 | + android:layout_height="wrap_content" | ||
| 89 | + android:layout_marginLeft="10dp" | ||
| 90 | + android:text="首都师范大学操场东门" | ||
| 91 | + android:textColor="@color/black" | ||
| 92 | + android:textSize="15sp" /> | ||
| 93 | + </LinearLayout> | ||
| 94 | + <!--竖线--> | ||
| 95 | + <View | ||
| 96 | + android:layout_width="1dp" | ||
| 97 | + android:layout_height="30dp" | ||
| 98 | + android:layout_marginLeft="19dp" | ||
| 99 | + android:layout_marginTop="-3dp" | ||
| 100 | + android:background="@color/vertical_line" /> | ||
| 101 | + <!--时间--> | ||
| 102 | + <LinearLayout | ||
| 103 | + android:layout_width="match_parent" | ||
| 104 | + android:layout_height="wrap_content" | ||
| 105 | + android:layout_marginTop="-17dp" | ||
| 106 | + android:gravity="center_vertical"> | ||
| 107 | + | ||
| 108 | + <View | ||
| 109 | + android:layout_width="7dp" | ||
| 110 | + android:layout_height="7dp" | ||
| 111 | + android:layout_marginLeft="16dp" | ||
| 112 | + android:background="@drawable/shape_circle_gray" /> | ||
| 113 | + | ||
| 114 | + <LinearLayout | ||
| 115 | + android:layout_width="match_parent" | ||
| 116 | + android:layout_height="wrap_content" | ||
| 117 | + android:orientation="vertical"> | ||
| 118 | + | ||
| 119 | + <TextView | ||
| 120 | + android:layout_width="wrap_content" | ||
| 121 | + android:layout_height="wrap_content" | ||
| 122 | + android:layout_marginLeft="10dp" | ||
| 123 | + android:text="00:27:23" | ||
| 124 | + android:textColor="@color/black" | ||
| 125 | + android:textSize="18sp" | ||
| 126 | + android:textStyle="bold" /> | ||
| 127 | + | ||
| 128 | + <TextView | ||
| 129 | + android:layout_width="wrap_content" | ||
| 130 | + android:layout_height="wrap_content" | ||
| 131 | + android:layout_marginLeft="10dp" | ||
| 132 | + android:text="跑步记录时长" | ||
| 133 | + android:textColor="@color/text_gray" | ||
| 134 | + android:textSize="12sp" /> | ||
| 135 | + <!----> | ||
| 136 | + </LinearLayout> | ||
| 137 | + </LinearLayout> | ||
| 138 | + <!--竖线--> | ||
| 139 | + <View | ||
| 140 | + android:layout_width="1dp" | ||
| 141 | + android:layout_height="30dp" | ||
| 142 | + android:layout_marginLeft="19dp" | ||
| 143 | + android:layout_marginTop="-15dp" | ||
| 144 | + android:background="@color/vertical_line" /> | ||
| 145 | + <!----> | ||
| 146 | + <LinearLayout | ||
| 147 | + android:layout_width="match_parent" | ||
| 148 | + android:layout_height="wrap_content" | ||
| 149 | + android:layout_marginTop="-5dp" | ||
| 150 | + android:layout_marginBottom="10dp" | ||
| 151 | + android:gravity="center_vertical"> | ||
| 152 | + | ||
| 153 | + <View | ||
| 154 | + android:layout_width="7dp" | ||
| 155 | + android:layout_height="7dp" | ||
| 156 | + android:layout_marginLeft="16dp" | ||
| 157 | + android:background="@drawable/shape_circle_gray" /> | ||
| 158 | + | ||
| 159 | + <TextView | ||
| 160 | + android:layout_width="wrap_content" | ||
| 161 | + android:layout_height="wrap_content" | ||
| 162 | + android:layout_marginLeft="10dp" | ||
| 163 | + android:text="路线完成" | ||
| 164 | + android:textColor="@color/black" | ||
| 165 | + android:textSize="15sp" | ||
| 166 | + android:textStyle="bold" /> | ||
| 167 | + </LinearLayout> | ||
| 168 | + <!----> | ||
| 169 | +</LinearLayout> | ||
| 0 | \ No newline at end of file | 170 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/layout_finish_step.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + android:layout_width="match_parent" | ||
| 4 | + android:layout_height="80dp" | ||
| 5 | + android:layout_margin="10dp" | ||
| 6 | + android:background="@drawable/shape_10dp_white_raduis_bg" | ||
| 7 | + android:orientation="vertical"> | ||
| 8 | + | ||
| 9 | + <LinearLayout | ||
| 10 | + android:layout_width="wrap_content" | ||
| 11 | + android:layout_height="wrap_content" | ||
| 12 | + android:layout_marginLeft="10dp" | ||
| 13 | + android:layout_marginTop="10dp" | ||
| 14 | + android:gravity="bottom"> | ||
| 15 | + | ||
| 16 | + <ImageView | ||
| 17 | + android:layout_width="25dp" | ||
| 18 | + android:layout_height="25dp" | ||
| 19 | + android:background="@drawable/icon_step" /> | ||
| 20 | + | ||
| 21 | + <TextView | ||
| 22 | + android:layout_width="wrap_content" | ||
| 23 | + android:layout_height="wrap_content" | ||
| 24 | + android:layout_marginLeft="10dp" | ||
| 25 | + android:text="总步数" /> | ||
| 26 | + </LinearLayout> | ||
| 27 | + <!----> | ||
| 28 | + <LinearLayout | ||
| 29 | + android:layout_width="match_parent" | ||
| 30 | + android:layout_height="match_parent" | ||
| 31 | + android:paddingBottom="10dp" | ||
| 32 | + android:gravity="center"> | ||
| 33 | + | ||
| 34 | + <TextView | ||
| 35 | + android:layout_width="wrap_content" | ||
| 36 | + android:layout_height="wrap_content" | ||
| 37 | + android:text="1233" | ||
| 38 | + android:textColor="@color/green_round" | ||
| 39 | + android:textSize="25sp" | ||
| 40 | + android:textStyle="bold" /> | ||
| 41 | + | ||
| 42 | + <TextView | ||
| 43 | + android:layout_width="wrap_content" | ||
| 44 | + android:layout_height="wrap_content" | ||
| 45 | + android:layout_marginLeft="10dp" | ||
| 46 | + android:layout_marginTop="4dp" | ||
| 47 | + android:text="步" | ||
| 48 | + android:textColor="@color/black" | ||
| 49 | + android:textSize="12sp" | ||
| 50 | + android:textStyle="bold" /> | ||
| 51 | + </LinearLayout> | ||
| 52 | + <!----> | ||
| 53 | +</LinearLayout> | ||
| 0 | \ No newline at end of file | 54 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/layout_finish_user_info.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | + android:layout_width="match_parent" | ||
| 5 | + android:layout_height="match_parent" | ||
| 6 | + android:layout_margin="10dp"> | ||
| 7 | + | ||
| 8 | + <LinearLayout | ||
| 9 | + android:layout_width="match_parent" | ||
| 10 | + android:layout_height="170dp" | ||
| 11 | + android:layout_marginTop="30dp" | ||
| 12 | + android:background="@drawable/shape_10dp_white_raduis_bg" | ||
| 13 | + android:orientation="vertical"> | ||
| 14 | + | ||
| 15 | + <TextView | ||
| 16 | + android:layout_width="wrap_content" | ||
| 17 | + android:layout_height="wrap_content" | ||
| 18 | + android:layout_marginLeft="80dp" | ||
| 19 | + android:layout_marginTop="10dp" | ||
| 20 | + android:text="用户昵称" | ||
| 21 | + android:textColor="@color/black" | ||
| 22 | + android:textSize="15sp" /> | ||
| 23 | + <!----> | ||
| 24 | + <LinearLayout | ||
| 25 | + android:layout_width="match_parent" | ||
| 26 | + android:layout_height="wrap_content" | ||
| 27 | + android:gravity="center_vertical"> | ||
| 28 | + | ||
| 29 | + <LinearLayout | ||
| 30 | + android:layout_width="0dp" | ||
| 31 | + android:layout_height="wrap_content" | ||
| 32 | + android:layout_weight="1" | ||
| 33 | + android:orientation="vertical"> | ||
| 34 | + | ||
| 35 | + <TextView | ||
| 36 | + android:layout_width="wrap_content" | ||
| 37 | + android:layout_height="wrap_content" | ||
| 38 | + android:layout_marginLeft="15dp" | ||
| 39 | + android:layout_marginTop="15dp" | ||
| 40 | + android:text="奥森公园南路" | ||
| 41 | + android:textColor="@color/black" | ||
| 42 | + android:textSize="15sp" /> | ||
| 43 | + | ||
| 44 | + <TextView | ||
| 45 | + android:layout_width="wrap_content" | ||
| 46 | + android:layout_height="wrap_content" | ||
| 47 | + android:layout_marginLeft="15dp" | ||
| 48 | + android:layout_marginTop="5dp" | ||
| 49 | + android:text="2019/06/10 9:51" | ||
| 50 | + android:textColor="@color/text_gray" /> | ||
| 51 | + </LinearLayout> | ||
| 52 | + <!----> | ||
| 53 | + <LinearLayout | ||
| 54 | + android:layout_width="0dp" | ||
| 55 | + android:layout_height="wrap_content" | ||
| 56 | + android:layout_weight="1" | ||
| 57 | + android:gravity="right|bottom"> | ||
| 58 | + | ||
| 59 | + <TextView | ||
| 60 | + android:layout_width="wrap_content" | ||
| 61 | + android:layout_height="wrap_content" | ||
| 62 | + android:layout_marginRight="10dp" | ||
| 63 | + android:text="1.53" | ||
| 64 | + android:textColor="@color/black" | ||
| 65 | + android:textSize="35sp" | ||
| 66 | + android:textStyle="bold" /> | ||
| 67 | + | ||
| 68 | + <TextView | ||
| 69 | + android:layout_width="wrap_content" | ||
| 70 | + android:layout_height="wrap_content" | ||
| 71 | + android:layout_marginRight="15dp" | ||
| 72 | + android:text="公里" | ||
| 73 | + android:textColor="@color/black" | ||
| 74 | + android:textSize="15sp" /> | ||
| 75 | + </LinearLayout> | ||
| 76 | + <!----> | ||
| 77 | + </LinearLayout> | ||
| 78 | + <!--横线--> | ||
| 79 | + <View | ||
| 80 | + android:layout_width="match_parent" | ||
| 81 | + android:layout_height="1dp" | ||
| 82 | + android:layout_marginTop="10dp" | ||
| 83 | + android:background="@color/line" /> | ||
| 84 | + <!--配速和用时--> | ||
| 85 | + <LinearLayout | ||
| 86 | + android:layout_width="match_parent" | ||
| 87 | + android:layout_height="wrap_content" | ||
| 88 | + android:layout_marginTop="10sp"> | ||
| 89 | + <!----> | ||
| 90 | + <LinearLayout | ||
| 91 | + android:layout_width="0dp" | ||
| 92 | + android:layout_height="wrap_content" | ||
| 93 | + android:layout_weight="1" | ||
| 94 | + android:gravity="center" | ||
| 95 | + android:orientation="vertical"> | ||
| 96 | + | ||
| 97 | + <TextView | ||
| 98 | + android:layout_width="wrap_content" | ||
| 99 | + android:layout_height="wrap_content" | ||
| 100 | + android:text="34'33''" | ||
| 101 | + android:textColor="@color/black" | ||
| 102 | + android:textSize="20sp" | ||
| 103 | + android:textStyle="bold" /> | ||
| 104 | + | ||
| 105 | + <TextView | ||
| 106 | + android:layout_width="wrap_content" | ||
| 107 | + android:layout_height="wrap_content" | ||
| 108 | + android:layout_marginTop="5dp" | ||
| 109 | + android:text="配速" | ||
| 110 | + android:textColor="@color/black" | ||
| 111 | + android:textSize="15sp" /> | ||
| 112 | + </LinearLayout> | ||
| 113 | + <!----> | ||
| 114 | + <LinearLayout | ||
| 115 | + android:layout_width="0dp" | ||
| 116 | + android:layout_height="wrap_content" | ||
| 117 | + android:layout_weight="1" | ||
| 118 | + android:gravity="center" | ||
| 119 | + android:orientation="vertical"> | ||
| 120 | + | ||
| 121 | + <TextView | ||
| 122 | + android:layout_width="wrap_content" | ||
| 123 | + android:layout_height="wrap_content" | ||
| 124 | + android:text="00:00:00" | ||
| 125 | + android:textColor="@color/black" | ||
| 126 | + android:textSize="20sp" | ||
| 127 | + android:textStyle="bold" /> | ||
| 128 | + | ||
| 129 | + <TextView | ||
| 130 | + android:layout_width="wrap_content" | ||
| 131 | + android:layout_height="wrap_content" | ||
| 132 | + android:layout_marginTop="5dp" | ||
| 133 | + android:text="用时" | ||
| 134 | + android:textColor="@color/black" | ||
| 135 | + android:textSize="15sp" /> | ||
| 136 | + </LinearLayout> | ||
| 137 | + <!----> | ||
| 138 | + </LinearLayout> | ||
| 139 | + <!----> | ||
| 140 | + </LinearLayout> | ||
| 141 | + | ||
| 142 | + <com.qmuiteam.qmui.widget.QMUIRadiusImageView | ||
| 143 | + android:id="@+id/qm_iv1" | ||
| 144 | + android:layout_width="60dp" | ||
| 145 | + android:layout_height="60dp" | ||
| 146 | + android:layout_marginLeft="10dp" | ||
| 147 | + android:background="@drawable/tc_ic_workout_level_adjust_coach" | ||
| 148 | + app:qmui_corner_radius="100dp" /> | ||
| 149 | +</FrameLayout> | ||
| 0 | \ No newline at end of file | 150 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/layout_run_detail_person_score.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | - android:background="@color/white" | ||
| 5 | - android:layout_height="wrap_content"> | 4 | + android:layout_height="wrap_content" |
| 5 | + android:background="@color/white"> | ||
| 6 | <!--个人最佳成绩--> | 6 | <!--个人最佳成绩--> |
| 7 | <LinearLayout | 7 | <LinearLayout |
| 8 | android:layout_width="match_parent" | 8 | android:layout_width="match_parent" |
| @@ -43,32 +43,39 @@ | @@ -43,32 +43,39 @@ | ||
| 43 | <!----> | 43 | <!----> |
| 44 | <LinearLayout | 44 | <LinearLayout |
| 45 | android:layout_width="match_parent" | 45 | android:layout_width="match_parent" |
| 46 | - android:layout_height="match_parent"> | 46 | + android:layout_height="wrap_content" |
| 47 | + android:layout_marginTop="10dp"> | ||
| 47 | 48 | ||
| 48 | <LinearLayout | 49 | <LinearLayout |
| 49 | android:layout_width="0dp" | 50 | android:layout_width="0dp" |
| 50 | android:layout_height="match_parent" | 51 | android:layout_height="match_parent" |
| 51 | android:layout_weight="1" | 52 | android:layout_weight="1" |
| 52 | - android:gravity="center" | ||
| 53 | - android:orientation="vertical"> | 53 | + android:gravity="left|bottom"> |
| 54 | 54 | ||
| 55 | <TextView | 55 | <TextView |
| 56 | android:layout_width="wrap_content" | 56 | android:layout_width="wrap_content" |
| 57 | android:layout_height="wrap_content" | 57 | android:layout_height="wrap_content" |
| 58 | + android:layout_marginLeft="15dp" | ||
| 58 | android:text="1.53" | 59 | android:text="1.53" |
| 59 | android:textColor="@color/black" | 60 | android:textColor="@color/black" |
| 60 | - android:textSize="20sp" | 61 | + android:textSize="25sp" |
| 61 | android:textStyle="bold" /> | 62 | android:textStyle="bold" /> |
| 62 | 63 | ||
| 63 | <TextView | 64 | <TextView |
| 64 | android:layout_width="wrap_content" | 65 | android:layout_width="wrap_content" |
| 65 | android:layout_height="wrap_content" | 66 | android:layout_height="wrap_content" |
| 66 | - android:layout_marginTop="10dp" | 67 | + android:layout_marginLeft="5dp" |
| 67 | android:text="公里" | 68 | android:text="公里" |
| 68 | android:textColor="@color/text_gray" | 69 | android:textColor="@color/text_gray" |
| 69 | - android:textSize="15sp" | ||
| 70 | - android:textStyle="bold" /> | 70 | + android:textSize="15sp" /> |
| 71 | </LinearLayout> | 71 | </LinearLayout> |
| 72 | + </LinearLayout> | ||
| 73 | + | ||
| 74 | + <LinearLayout | ||
| 75 | + android:layout_width="match_parent" | ||
| 76 | + android:layout_height="wrap_content" | ||
| 77 | + android:layout_marginTop="10dp" | ||
| 78 | + android:layout_marginBottom="10dp"> | ||
| 72 | 79 | ||
| 73 | <LinearLayout | 80 | <LinearLayout |
| 74 | android:layout_width="0dp" | 81 | android:layout_width="0dp" |
| @@ -80,19 +87,20 @@ | @@ -80,19 +87,20 @@ | ||
| 80 | <TextView | 87 | <TextView |
| 81 | android:layout_width="wrap_content" | 88 | android:layout_width="wrap_content" |
| 82 | android:layout_height="wrap_content" | 89 | android:layout_height="wrap_content" |
| 83 | - android:text="1234" | ||
| 84 | - android:textColor="@color/black" | ||
| 85 | - android:textSize="20sp" | ||
| 86 | - android:textStyle="bold" /> | 90 | + android:text="步数" |
| 91 | + android:textColor="@color/text_gray" | ||
| 92 | + android:textSize="15sp" /> | ||
| 87 | 93 | ||
| 88 | <TextView | 94 | <TextView |
| 89 | android:layout_width="wrap_content" | 95 | android:layout_width="wrap_content" |
| 90 | android:layout_height="wrap_content" | 96 | android:layout_height="wrap_content" |
| 91 | - android:layout_marginTop="10dp" | ||
| 92 | - android:text="步数" | ||
| 93 | - android:textColor="@color/text_gray" | ||
| 94 | - android:textSize="15sp" | 97 | + android:layout_marginTop="5dp" |
| 98 | + android:text="1234" | ||
| 99 | + android:textColor="@color/black" | ||
| 100 | + android:textSize="20sp" | ||
| 95 | android:textStyle="bold" /> | 101 | android:textStyle="bold" /> |
| 102 | + | ||
| 103 | + | ||
| 96 | </LinearLayout> | 104 | </LinearLayout> |
| 97 | 105 | ||
| 98 | <LinearLayout | 106 | <LinearLayout |
| @@ -105,19 +113,21 @@ | @@ -105,19 +113,21 @@ | ||
| 105 | <TextView | 113 | <TextView |
| 106 | android:layout_width="wrap_content" | 114 | android:layout_width="wrap_content" |
| 107 | android:layout_height="wrap_content" | 115 | android:layout_height="wrap_content" |
| 108 | - android:text="00:27:23" | ||
| 109 | - android:textColor="@color/black" | ||
| 110 | - android:textSize="20sp" | ||
| 111 | - android:textStyle="bold" /> | 116 | + |
| 117 | + android:text="用时" | ||
| 118 | + android:textColor="@color/text_gray" | ||
| 119 | + android:textSize="15sp" /> | ||
| 112 | 120 | ||
| 113 | <TextView | 121 | <TextView |
| 114 | android:layout_width="wrap_content" | 122 | android:layout_width="wrap_content" |
| 115 | android:layout_height="wrap_content" | 123 | android:layout_height="wrap_content" |
| 116 | - android:layout_marginTop="10dp" | ||
| 117 | - android:text="用时" | ||
| 118 | - android:textColor="@color/text_gray" | ||
| 119 | - android:textSize="15sp" | 124 | + android:layout_marginTop="5dp" |
| 125 | + android:text="00:27:23" | ||
| 126 | + android:textColor="@color/black" | ||
| 127 | + android:textSize="20sp" | ||
| 120 | android:textStyle="bold" /> | 128 | android:textStyle="bold" /> |
| 129 | + | ||
| 130 | + | ||
| 121 | </LinearLayout> | 131 | </LinearLayout> |
| 122 | 132 | ||
| 123 | <LinearLayout | 133 | <LinearLayout |
| @@ -130,19 +140,20 @@ | @@ -130,19 +140,20 @@ | ||
| 130 | <TextView | 140 | <TextView |
| 131 | android:layout_width="wrap_content" | 141 | android:layout_width="wrap_content" |
| 132 | android:layout_height="wrap_content" | 142 | android:layout_height="wrap_content" |
| 133 | - android:text="99" | ||
| 134 | - android:textColor="@color/black" | ||
| 135 | - android:textSize="20sp" | ||
| 136 | - android:textStyle="bold" /> | 143 | + android:text="配速" |
| 144 | + android:textColor="@color/text_gray" | ||
| 145 | + android:textSize="15sp" /> | ||
| 137 | 146 | ||
| 138 | <TextView | 147 | <TextView |
| 139 | android:layout_width="wrap_content" | 148 | android:layout_width="wrap_content" |
| 140 | android:layout_height="wrap_content" | 149 | android:layout_height="wrap_content" |
| 141 | - android:layout_marginTop="10dp" | ||
| 142 | - android:text="千卡" | ||
| 143 | - android:textColor="@color/text_gray" | ||
| 144 | - android:textSize="15sp" | 150 | + android:layout_marginTop="5dp" |
| 151 | + android:text="22'22''" | ||
| 152 | + android:textColor="@color/black" | ||
| 153 | + android:textSize="20sp" | ||
| 145 | android:textStyle="bold" /> | 154 | android:textStyle="bold" /> |
| 155 | + | ||
| 156 | + | ||
| 146 | </LinearLayout> | 157 | </LinearLayout> |
| 147 | </LinearLayout> | 158 | </LinearLayout> |
| 148 | </LinearLayout> | 159 | </LinearLayout> |
moudle_pedometer/src/main/res/layout/layout_run_detail_rank.xml
| @@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
| 48 | <LinearLayout | 48 | <LinearLayout |
| 49 | android:layout_width="0dp" | 49 | android:layout_width="0dp" |
| 50 | android:layout_height="match_parent" | 50 | android:layout_height="match_parent" |
| 51 | - android:layout_weight="1" | 51 | + android:layout_weight="1.2" |
| 52 | android:gravity="center" | 52 | android:gravity="center" |
| 53 | android:orientation="vertical"> | 53 | android:orientation="vertical"> |
| 54 | 54 | ||
| @@ -85,13 +85,12 @@ | @@ -85,13 +85,12 @@ | ||
| 85 | <LinearLayout | 85 | <LinearLayout |
| 86 | android:layout_width="0dp" | 86 | android:layout_width="0dp" |
| 87 | android:layout_height="match_parent" | 87 | android:layout_height="match_parent" |
| 88 | - android:layout_weight="1" | ||
| 89 | - android:gravity="center"> | 88 | + android:layout_weight="1.2" |
| 89 | + android:gravity="center|right"> | ||
| 90 | 90 | ||
| 91 | <LinearLayout | 91 | <LinearLayout |
| 92 | - android:layout_width="0dp" | 92 | + android:layout_width="wrap_content" |
| 93 | android:layout_height="match_parent" | 93 | android:layout_height="match_parent" |
| 94 | - android:layout_weight="1" | ||
| 95 | android:gravity="center" | 94 | android:gravity="center" |
| 96 | android:orientation="vertical"> | 95 | android:orientation="vertical"> |
| 97 | 96 | ||
| @@ -99,7 +98,7 @@ | @@ -99,7 +98,7 @@ | ||
| 99 | <TextView | 98 | <TextView |
| 100 | android:layout_width="wrap_content" | 99 | android:layout_width="wrap_content" |
| 101 | android:layout_height="wrap_content" | 100 | android:layout_height="wrap_content" |
| 102 | - android:text="1234步" | 101 | + android:text="00:27:23" |
| 103 | android:textColor="@color/black" | 102 | android:textColor="@color/black" |
| 104 | android:textSize="20sp" | 103 | android:textSize="20sp" |
| 105 | android:textStyle="bold" /> | 104 | android:textStyle="bold" /> |
| @@ -107,7 +106,7 @@ | @@ -107,7 +106,7 @@ | ||
| 107 | <TextView | 106 | <TextView |
| 108 | android:layout_width="wrap_content" | 107 | android:layout_width="wrap_content" |
| 109 | android:layout_height="wrap_content" | 108 | android:layout_height="wrap_content" |
| 110 | - android:layout_marginTop="15dp" | 109 | + android:layout_marginTop="5dp" |
| 111 | android:text="用户昵称" | 110 | android:text="用户昵称" |
| 112 | android:textColor="@color/text_gray" | 111 | android:textColor="@color/text_gray" |
| 113 | android:textSize="15sp" /> | 112 | android:textSize="15sp" /> |
| @@ -116,14 +115,15 @@ | @@ -116,14 +115,15 @@ | ||
| 116 | </LinearLayout> | 115 | </LinearLayout> |
| 117 | 116 | ||
| 118 | <LinearLayout | 117 | <LinearLayout |
| 119 | - android:layout_width="0dp" | 118 | + android:layout_width="wrap_content" |
| 120 | android:layout_height="match_parent" | 119 | android:layout_height="match_parent" |
| 121 | - android:layout_weight="1" | ||
| 122 | android:gravity="center"> | 120 | android:gravity="center"> |
| 123 | 121 | ||
| 124 | <com.qmuiteam.qmui.widget.QMUIRadiusImageView | 122 | <com.qmuiteam.qmui.widget.QMUIRadiusImageView |
| 125 | android:layout_width="60dp" | 123 | android:layout_width="60dp" |
| 126 | android:layout_height="60dp" | 124 | android:layout_height="60dp" |
| 125 | + android:layout_marginLeft="10dp" | ||
| 126 | + android:layout_marginRight="15dp" | ||
| 127 | android:background="@drawable/tc_ic_workout_level_adjust_coach" | 127 | android:background="@drawable/tc_ic_workout_level_adjust_coach" |
| 128 | app:qmui_corner_radius="100dp" /> | 128 | app:qmui_corner_radius="100dp" /> |
| 129 | </LinearLayout> | 129 | </LinearLayout> |
moudle_pedometer/src/main/res/layout/layout_run_detail_street.xml
| @@ -21,10 +21,10 @@ | @@ -21,10 +21,10 @@ | ||
| 21 | <LinearLayout | 21 | <LinearLayout |
| 22 | android:id="@+id/ll_first_panel_root" | 22 | android:id="@+id/ll_first_panel_root" |
| 23 | android:layout_width="match_parent" | 23 | android:layout_width="match_parent" |
| 24 | - android:layout_height="100dp" | 24 | + android:layout_height="wrap_content" |
| 25 | android:layout_marginLeft="15dp" | 25 | android:layout_marginLeft="15dp" |
| 26 | android:layout_marginRight="15dp" | 26 | android:layout_marginRight="15dp" |
| 27 | - android:background="@color/white" | 27 | + android:background="@drawable/shape_left_right_10dp_white_raduis_bg" |
| 28 | android:orientation="vertical"> | 28 | android:orientation="vertical"> |
| 29 | <!--活动标题--> | 29 | <!--活动标题--> |
| 30 | <TextView | 30 | <TextView |
moudle_pedometer/src/main/res/values/colors.xml
| @@ -8,6 +8,7 @@ | @@ -8,6 +8,7 @@ | ||
| 8 | <color name="gray_round">#D6D6D6</color> | 8 | <color name="gray_round">#D6D6D6</color> |
| 9 | <color name="circle_stop">#40000000</color> | 9 | <color name="circle_stop">#40000000</color> |
| 10 | <color name="line">#EEEEEE</color> | 10 | <color name="line">#EEEEEE</color> |
| 11 | + <color name="vertical_line">#CACACA</color> | ||
| 11 | <color name="black">#000000</color> | 12 | <color name="black">#000000</color> |
| 12 | <color name="btn_green">#23D41E</color> | 13 | <color name="btn_green">#23D41E</color> |
| 13 | <color name="transparent">#00000000</color> | 14 | <color name="transparent">#00000000</color> |
| @@ -15,7 +16,13 @@ | @@ -15,7 +16,13 @@ | ||
| 15 | <!--圆形shape --> | 16 | <!--圆形shape --> |
| 16 | <!--半透明黑色--> | 17 | <!--半透明黑色--> |
| 17 | <color name="black_50">#80000000</color> | 18 | <color name="black_50">#80000000</color> |
| 19 | + <color name="black_20">#33000000</color> | ||
| 20 | + | ||
| 21 | + <color name="white_50">#80FFFFFF</color> | ||
| 22 | + | ||
| 18 | <color name="green">#23D026</color> | 23 | <color name="green">#23D026</color> |
| 24 | + <color name="green_50">#8023D026</color> | ||
| 25 | + | ||
| 19 | <color name="red">#EF5544</color> | 26 | <color name="red">#EF5544</color> |
| 20 | 27 | ||
| 21 | 28 |
moudle_pedometer/src/main/res/values/ids.xml
| @@ -3,6 +3,8 @@ | @@ -3,6 +3,8 @@ | ||
| 3 | <item name="fragment_run_main" type="id" /> | 3 | <item name="fragment_run_main" type="id" /> |
| 4 | <item name="fragment_running_map" type="id" /> | 4 | <item name="fragment_running_map" type="id" /> |
| 5 | <item name="fragment_run_trace_detail" type="id" /> | 5 | <item name="fragment_run_trace_detail" type="id" /> |
| 6 | - <item name="fragment_back" type="id"/> | 6 | + <item name="fragment_back" type="id" /> |
| 7 | <item name="fragment_more" type="id" /> | 7 | <item name="fragment_more" type="id" /> |
| 8 | + <item name="fragment_finish_run_map" type="id" /> | ||
| 9 | + | ||
| 8 | </resources> | 10 | </resources> |