Commit afa347fdad53725e18f69b29fb145c682293cad4

Authored by 韩亚云
2 parents bb18b98f 9df709a2

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 3 <component name="GradleSettings">
4 4 <option name="linkedExternalProjectsSettings">
5 5 <GradleProjectSettings>
6   - <compositeConfiguration>
7   - <compositeBuild compositeDefinitionSource="SCRIPT" />
8   - </compositeConfiguration>
9 6 <option name="distributionType" value="DEFAULT_WRAPPED" />
10 7 <option name="externalProjectPath" value="$PROJECT_DIR$" />
11 8 <option name="modules">
... ...
config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.0.6",
  24 + version: "0.0.9",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/AndroidManifest.xml
... ... @@ -107,6 +107,9 @@
107 107 <activity
108 108 android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity"
109 109 android:process=":step" />
  110 + <activity
  111 + android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity"
  112 + android:process=":step" />
110 113 </application>
111 114  
112 115 </manifest>
113 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&lt;RunningMapFrag
149 149 public void onHistoryTrackCallback(HistoryTrackResponse response) {
150 150 super.onHistoryTrackCallback(response);
151 151 int total = response.getTotal();
152   - Log.e(TAG, "onHistoryTrackCallback: total" + total + "数量");
153 152  
154 153 if (StatusCodes.SUCCESS != response.getStatus()) {
155 154 Toast.makeText(context, "获取轨迹失败!" + response.getStatus(), Toast.LENGTH_SHORT).show();
... ... @@ -278,25 +277,6 @@ public class RunningMapFragmentPresenter extends MvpBasePresenter&lt;RunningMapFrag
278 277 @Override
279 278 public void onReceiveLocation(TraceLocation traceLocation) {
280 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&lt;RunningMapFrag
356 336 @Override
357 337 public void onMonitoredStatusCallback(MonitoredStatusResponse monitoredStatusResponse) {
358 338 Toast.makeText(context, "围栏列表回调成功:onMonitoredStatusCallback", Toast.LENGTH_SHORT).show();
359   - Log.e(TAG, "onMonitoredStatusCallback: " + monitoredStatusResponse.getMonitoredStatusInfos().get(0).getMonitoredStatus());
360 339 //查询监控对象状态响应结果
361 340 List<MonitoredStatusInfo> monitoredStatusInfos = monitoredStatusResponse.getMonitoredStatusInfos();
362 341 for (MonitoredStatusInfo monitoredStatusInfo : monitoredStatusInfos) {
363 342 monitoredStatusInfo.getFenceId();
364   -
365 343 MonitoredStatus status = monitoredStatusInfo.getMonitoredStatus();//获取状态
366 344 switch (status) {
367 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 5 import android.os.Handler;
6 6 import android.os.SystemClock;
7 7 import android.support.v4.content.ContextCompat;
  8 +import android.text.TextUtils;
8 9 import android.util.Log;
9 10 import android.view.MotionEvent;
10 11 import android.view.View;
... ... @@ -15,6 +16,8 @@ import com.cnlive.moudle.pedometer.model.Constant;
15 16 import com.cnlive.moudle.pedometer.model.MessageEvent;
16 17 import com.cnlive.moudle.pedometer.service.StepService;
17 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 21 import com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity;
19 22 import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment;
20 23 import com.cnlive.moudle.pedometer.ui.widget.SelectDialog;
... ... @@ -181,7 +184,7 @@ public class RunMainFragmentView implements MvpView {
181 184 }
182 185 needWriteDataFlag = true;
183 186 //将当前计时器时间戳写入数据库
184   - setSQLPauseTime();
  187 + setSQLPauseTime(uid);
185 188 //为了点击时可以显示缩放动画,这里延迟一个动画时间进行(包括放大和缩小)
186 189 handler.postDelayed(new Runnable() {
187 190 @Override
... ... @@ -253,7 +256,7 @@ public class RunMainFragmentView implements MvpView {
253 256 MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putLong("stepStartTime", 0);
254 257 fragment.getActivity().stopService(new Intent(fragment.getActivity(), StepService.class));
255 258 MySpHelper.getInstance(getContext(), Context.MODE_MULTI_PROCESS).putString("userId", "");
256   -
  259 + RunningFinishActivity.startActivity(fragment.getActivity());
257 260 // fragment.getActivity().finish();
258 261 }
259 262 }, "取消", new SelectDialog.DialogInterface() {
... ... @@ -311,7 +314,7 @@ public class RunMainFragmentView implements MvpView {
311 314 StepService.mClient.stopGather(StepService.traceListener);
312 315 }
313 316 //将当前计时器时间戳写入数据库
314   - setSQLPauseTime();
  317 + setSQLPauseTime(uid);
315 318 needWriteDataFlag = false;
316 319 ButtonAnimUtil.setViewHideZoomOut(fragment.binding.llPause);
317 320 handler.postDelayed(new Runnable() {
... ... @@ -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 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 108 private LatLng startLatLng = new LatLng(39.934733, 116.308646);//起始点
109 109 private List<LatLng> trackPoints;
110 110  
111   -
112 111 public RunRaceDetailFragmentView(RunRaceDetailFragment fragment) {
113 112 this.fragment = fragment;
114 113 }
... ... @@ -128,37 +127,45 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
128 127 //设置底部卡片第一次可滑动的位置
129 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 132 fragment.binding.slidingLayout.addPanelSlideListener(new SlidingUpPanelLayout.PanelSlideListener() {
133 133 @Override
134 134 public void onPanelSlide(View panel, float slideOffset) {
135   - Log.e(TAG, "onPanelSlide: slideOffset" + slideOffset);
136 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 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 145 if (leakWidth - ScreenUtil.dip2px(getContext(), current) <= ScreenUtil.dip2px(getContext(), 15)) {
142 146 if (leakWidth - ScreenUtil.dip2px(getContext(), current) >= 0) {
143 147 layoutParams.setMargins(leakWidth - ScreenUtil.dip2px(getContext(), current), 0, leakWidth - ScreenUtil.dip2px(getContext(), current), 0);
144 148 } else {
145 149 layoutParams.setMargins(0, 0, 0, 0);
146 150 }
  151 +
147 152 fragment.binding.includeStreet.llFirstPanelRoot.setLayoutParams(layoutParams);
148 153 fragment.binding.includeStreet.llBottomPanel.setLayoutParams(layoutParams);
149 154 }
  155 +
150 156 }
151 157  
152 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 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 309 //可选,设置是否需要地址描述
303 310 option.setIsNeedLocationDescribe(true);
304 311 //可选,设置是否需要设备方向结果
305   - option.setNeedDeviceDirect(true);
  312 + option.setNeedDeviceDirect(false);
306 313 //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
307 314 option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
308 315 mLocClient.setLocOption(option);
... ... @@ -610,11 +617,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
610 617 return;
611 618 }
612 619 }
613   - mCurrentAccracy = location.getRadius();
614 620 followMyLocation = new MyLocationData.Builder()
615 621 .accuracy(location.getRadius())
616 622 // 此处设置开发者获取到的方向信息,顺时针0-360
617   - .direction(mCurrentDirection).latitude(location.getLatitude())
  623 + .direction(location.getDirection()).latitude(location.getLatitude())
618 624 .longitude(location.getLongitude()).build();
619 625 if (followMyLocation == null || followMyLocation.latitude == 0 || followMyLocation.longitude == 0) {
620 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 23 import com.baidu.mapapi.map.BitmapDescriptor;
24 24 import com.baidu.mapapi.map.BitmapDescriptorFactory;
25 25 import com.baidu.mapapi.map.MapStatus;
  26 +import com.baidu.mapapi.map.MapStatusUpdateFactory;
26 27 import com.baidu.mapapi.map.MapView;
27 28 import com.baidu.mapapi.map.MarkerOptions;
28 29 import com.baidu.mapapi.map.MyLocationConfiguration;
... ... @@ -131,14 +132,19 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
131 132 baiduMap.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() {
132 133 @Override
133 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 140 if (isFirstLoadMap) {
135 141 isFirstLoadMap = false;
136 142 new Handler().postDelayed(new Runnable() {
137 143 @Override
138 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 200  
195 201 @Override
196 202 public void onReceiveLocation(BDLocation location) {
197   - Toast.makeText(getContext(), "aa", Toast.LENGTH_SHORT).show();
198 203 Log.e(TAG, "onReceiveLocation: 状态" + location.getGpsAccuracyStatus());
199 204 // map view 销毁后不在处理新接收的位置
200 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 import com.cnlive.libs.base.util.StatusBarUtil;
7 7 import com.cnlive.libs.base.util.StatusBarUtil2;
8 8 import com.cnlive.moudle.pedometer.ui.fragment.RunLineFragment;
  9 +import com.cnlive.moudle.pedometer.ui.fragment.RunningFinishFragment;
9 10 import com.example.moudle_pedometer.R;
10 11  
11 12 /**
... ... @@ -22,5 +23,6 @@ public class RunLineActivity extends AppCompatActivity {
22 23 setContentView(R.layout.activity_run_line);
23 24  
24 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 34  
35 35 @Override
36 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 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 3 import android.os.Bundle;
4 4 import android.os.Handler;
5 5 import android.support.annotation.Nullable;
  6 +import android.text.TextUtils;
6 7 import android.util.Log;
7 8 import android.view.View;
8 9  
... ... @@ -23,7 +24,7 @@ import org.greenrobot.eventbus.ThreadMode;
23 24  
24 25 public class RunMainFragment extends QMUIFragment<RunMainFragmentView, RunMainFragmentPresenter, FragmentRunMainBinding> {
25 26 private final String TAG = "RunMainFragment";
26   -
  27 + private String userId = "yangshuai";
27 28  
28 29 @Override
29 30 public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
... ... @@ -54,7 +55,9 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
54 55 super.onPause();
55 56 //记录当前计时器相关数据
56 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 1 package com.cnlive.moudle.pedometer.utils;
2 2  
3 3 import android.content.Context;
  4 +import android.text.TextUtils;
4 5 import android.util.Log;
5 6  
6 7 import com.cnlive.moudle.pedometer.model.Constant;
... ... @@ -102,13 +103,17 @@ public class StepUtil {
102 103 }
103 104  
104 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 117 } else {
113 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
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="100dp" />
  4 + <solid android:color="@color/black_50" />
  5 +</shape>
0 6 \ No newline at end of file
... ...
moudle_pedometer/src/main/res/drawable/shape_circle_gray.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<shape xmlns:android="http://schemas.android.com/apk/res/android">
  3 + <corners android:radius="100dp" />
  4 + <solid android:color="@color/text_gray" />
  5 +</shape>
0 6 \ No newline at end of file
... ...
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 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 123 \ No newline at end of file
... ...
moudle_pedometer/src/main/res/layout/fragment_run_race_detail.xml
... ... @@ -8,9 +8,10 @@
8 8 android:layout_height="match_parent"
9 9 android:gravity="bottom"
10 10 sothree:umanoDragView="@+id/dragView"
  11 + sothree:umanoFadeColor="@color/black_20"
11 12 sothree:umanoOverlay="true"
12   - sothree:umanoPanelHeight="100dp"
13   - sothree:umanoParallaxOffset="100dp"
  13 + sothree:umanoPanelHeight="142dp"
  14 + sothree:umanoParallaxOffset="250dp"
14 15 sothree:umanoScrollableView="@+id/scrollView"
15 16 sothree:umanoShadowHeight="0dp">
16 17  
... ... @@ -60,14 +61,13 @@
60 61 android:id="@+id/dragView"
61 62 android:layout_width="match_parent"
62 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 67 <ScrollView
68 68 android:id="@+id/scrollView"
69 69 android:layout_width="match_parent"
70   - android:layout_height="wrap_content"
  70 + android:layout_height="match_parent"
71 71 android:scrollbars="none">
72 72  
73 73 <LinearLayout
... ... @@ -82,13 +82,13 @@
82 82 <!--成绩-->
83 83 <include
84 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 88 <include
89 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 93 <include
94 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 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 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 150 \ No newline at end of file
... ...
moudle_pedometer/src/main/res/layout/layout_run_detail_person_score.xml
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 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 7 <LinearLayout
8 8 android:layout_width="match_parent"
... ... @@ -43,32 +43,39 @@
43 43 <!---->
44 44 <LinearLayout
45 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 49 <LinearLayout
49 50 android:layout_width="0dp"
50 51 android:layout_height="match_parent"
51 52 android:layout_weight="1"
52   - android:gravity="center"
53   - android:orientation="vertical">
  53 + android:gravity="left|bottom">
54 54  
55 55 <TextView
56 56 android:layout_width="wrap_content"
57 57 android:layout_height="wrap_content"
  58 + android:layout_marginLeft="15dp"
58 59 android:text="1.53"
59 60 android:textColor="@color/black"
60   - android:textSize="20sp"
  61 + android:textSize="25sp"
61 62 android:textStyle="bold" />
62 63  
63 64 <TextView
64 65 android:layout_width="wrap_content"
65 66 android:layout_height="wrap_content"
66   - android:layout_marginTop="10dp"
  67 + android:layout_marginLeft="5dp"
67 68 android:text="公里"
68 69 android:textColor="@color/text_gray"
69   - android:textSize="15sp"
70   - android:textStyle="bold" />
  70 + android:textSize="15sp" />
71 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 80 <LinearLayout
74 81 android:layout_width="0dp"
... ... @@ -80,19 +87,20 @@
80 87 <TextView
81 88 android:layout_width="wrap_content"
82 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 94 <TextView
89 95 android:layout_width="wrap_content"
90 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 101 android:textStyle="bold" />
  102 +
  103 +
96 104 </LinearLayout>
97 105  
98 106 <LinearLayout
... ... @@ -105,19 +113,21 @@
105 113 <TextView
106 114 android:layout_width="wrap_content"
107 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 121 <TextView
114 122 android:layout_width="wrap_content"
115 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 128 android:textStyle="bold" />
  129 +
  130 +
121 131 </LinearLayout>
122 132  
123 133 <LinearLayout
... ... @@ -130,19 +140,20 @@
130 140 <TextView
131 141 android:layout_width="wrap_content"
132 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 147 <TextView
139 148 android:layout_width="wrap_content"
140 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 154 android:textStyle="bold" />
  155 +
  156 +
146 157 </LinearLayout>
147 158 </LinearLayout>
148 159 </LinearLayout>
... ...
moudle_pedometer/src/main/res/layout/layout_run_detail_rank.xml
... ... @@ -48,7 +48,7 @@
48 48 <LinearLayout
49 49 android:layout_width="0dp"
50 50 android:layout_height="match_parent"
51   - android:layout_weight="1"
  51 + android:layout_weight="1.2"
52 52 android:gravity="center"
53 53 android:orientation="vertical">
54 54  
... ... @@ -85,13 +85,12 @@
85 85 <LinearLayout
86 86 android:layout_width="0dp"
87 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 91 <LinearLayout
92   - android:layout_width="0dp"
  92 + android:layout_width="wrap_content"
93 93 android:layout_height="match_parent"
94   - android:layout_weight="1"
95 94 android:gravity="center"
96 95 android:orientation="vertical">
97 96  
... ... @@ -99,7 +98,7 @@
99 98 <TextView
100 99 android:layout_width="wrap_content"
101 100 android:layout_height="wrap_content"
102   - android:text="1234步"
  101 + android:text="00:27:23"
103 102 android:textColor="@color/black"
104 103 android:textSize="20sp"
105 104 android:textStyle="bold" />
... ... @@ -107,7 +106,7 @@
107 106 <TextView
108 107 android:layout_width="wrap_content"
109 108 android:layout_height="wrap_content"
110   - android:layout_marginTop="15dp"
  109 + android:layout_marginTop="5dp"
111 110 android:text="用户昵称"
112 111 android:textColor="@color/text_gray"
113 112 android:textSize="15sp" />
... ... @@ -116,14 +115,15 @@
116 115 </LinearLayout>
117 116  
118 117 <LinearLayout
119   - android:layout_width="0dp"
  118 + android:layout_width="wrap_content"
120 119 android:layout_height="match_parent"
121   - android:layout_weight="1"
122 120 android:gravity="center">
123 121  
124 122 <com.qmuiteam.qmui.widget.QMUIRadiusImageView
125 123 android:layout_width="60dp"
126 124 android:layout_height="60dp"
  125 + android:layout_marginLeft="10dp"
  126 + android:layout_marginRight="15dp"
127 127 android:background="@drawable/tc_ic_workout_level_adjust_coach"
128 128 app:qmui_corner_radius="100dp" />
129 129 </LinearLayout>
... ...
moudle_pedometer/src/main/res/layout/layout_run_detail_street.xml
... ... @@ -21,10 +21,10 @@
21 21 <LinearLayout
22 22 android:id="@+id/ll_first_panel_root"
23 23 android:layout_width="match_parent"
24   - android:layout_height="100dp"
  24 + android:layout_height="wrap_content"
25 25 android:layout_marginLeft="15dp"
26 26 android:layout_marginRight="15dp"
27   - android:background="@color/white"
  27 + android:background="@drawable/shape_left_right_10dp_white_raduis_bg"
28 28 android:orientation="vertical">
29 29 <!--活动标题-->
30 30 <TextView
... ...
moudle_pedometer/src/main/res/values/colors.xml
... ... @@ -8,6 +8,7 @@
8 8 <color name="gray_round">#D6D6D6</color>
9 9 <color name="circle_stop">#40000000</color>
10 10 <color name="line">#EEEEEE</color>
  11 + <color name="vertical_line">#CACACA</color>
11 12 <color name="black">#000000</color>
12 13 <color name="btn_green">#23D41E</color>
13 14 <color name="transparent">#00000000</color>
... ... @@ -15,7 +16,13 @@
15 16 <!--圆形shape -->
16 17 <!--半透明黑色-->
17 18 <color name="black_50">#80000000</color>
  19 + <color name="black_20">#33000000</color>
  20 +
  21 + <color name="white_50">#80FFFFFF</color>
  22 +
18 23 <color name="green">#23D026</color>
  24 + <color name="green_50">#8023D026</color>
  25 +
19 26 <color name="red">#EF5544</color>
20 27  
21 28  
... ...
moudle_pedometer/src/main/res/values/ids.xml
... ... @@ -3,6 +3,8 @@
3 3 <item name="fragment_run_main" type="id" />
4 4 <item name="fragment_running_map" type="id" />
5 5 <item name="fragment_run_trace_detail" type="id" />
6   - <item name="fragment_back" type="id"/>
  6 + <item name="fragment_back" type="id" />
7 7 <item name="fragment_more" type="id" />
  8 + <item name="fragment_finish_run_map" type="id" />
  9 +
8 10 </resources>
... ...