Commit 53bc718424eafee6c6b963e70981924fa4595aa1

Authored by 杨帅
1 parent a72f39f5

1.新增GPS状态实时显示

Showing 54 changed files with 445 additions and 85 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">
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/commonInfo/CommonInfo.java
@@ -54,8 +54,8 @@ public class CommonInfo { @@ -54,8 +54,8 @@ public class CommonInfo {
54 /** 54 /**
55 * @param context 55 * @param context
56 */ 56 */
57 - public static void getUserId(Context context) {  
58 - MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("userId", ""); 57 + public static String getUserId(Context context) {
  58 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("userId", "");
59 } 59 }
60 60
61 /** 61 /**
@@ -75,7 +75,7 @@ public class CommonInfo { @@ -75,7 +75,7 @@ public class CommonInfo {
75 * @param context 75 * @param context
76 */ 76 */
77 public static boolean getIsRunStepService(Context context) { 77 public static boolean getIsRunStepService(Context context) {
78 - return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("runStepService", false); 78 + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("runStepService", false);
79 } 79 }
80 80
81 /*重置 81 /*重置
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunMainFragmentView.java
@@ -10,7 +10,16 @@ import android.util.Log; @@ -10,7 +10,16 @@ import android.util.Log;
10 import android.view.MotionEvent; 10 import android.view.MotionEvent;
11 import android.view.View; 11 import android.view.View;
12 import android.widget.Chronometer; 12 import android.widget.Chronometer;
13 - 13 +import android.widget.Toast;
  14 +
  15 +import com.baidu.location.BDAbstractLocationListener;
  16 +import com.baidu.location.BDLocation;
  17 +import com.baidu.location.LocationClient;
  18 +import com.baidu.location.LocationClientOption;
  19 +import com.baidu.mapapi.map.MapStatus;
  20 +import com.baidu.mapapi.map.MyLocationData;
  21 +import com.baidu.mapapi.model.LatLng;
  22 +import com.baidu.mapapi.utils.DistanceUtil;
14 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; 23 import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
15 import com.cnlive.moudle.pedometer.model.RunningFinishBean; 24 import com.cnlive.moudle.pedometer.model.RunningFinishBean;
16 import com.cnlive.moudle.pedometer.model.RunningMapBean; 25 import com.cnlive.moudle.pedometer.model.RunningMapBean;
@@ -24,9 +33,11 @@ import com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity; @@ -24,9 +33,11 @@ import com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity;
24 import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment; 33 import com.cnlive.moudle.pedometer.ui.fragment.RunMainFragment;
25 import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; 34 import com.cnlive.moudle.pedometer.ui.widget.SelectDialog;
26 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil; 35 import com.cnlive.moudle.pedometer.utils.ButtonAnimUtil;
  36 +import com.cnlive.moudle.pedometer.utils.MyMapUtil;
27 import com.cnlive.moudle.pedometer.utils.MySpHelper; 37 import com.cnlive.moudle.pedometer.utils.MySpHelper;
28 import com.cnlive.moudle.pedometer.utils.StepUtil; 38 import com.cnlive.moudle.pedometer.utils.StepUtil;
29 import com.cnlive.moudle.pedometer.utils.TimeUtil; 39 import com.cnlive.moudle.pedometer.utils.TimeUtil;
  40 +import com.cnlive.strike.application.GlideApp;
30 import com.example.moudle_pedometer.R; 41 import com.example.moudle_pedometer.R;
31 import com.hannesdorfmann.mosby3.mvp.MvpView; 42 import com.hannesdorfmann.mosby3.mvp.MvpView;
32 43
@@ -42,13 +53,14 @@ public class RunMainFragmentView implements MvpView { @@ -42,13 +53,14 @@ public class RunMainFragmentView implements MvpView {
42 private Handler handler; 53 private Handler handler;
43 private Runnable runnable; 54 private Runnable runnable;
44 private Runnable animRunnable; 55 private Runnable animRunnable;
45 -  
46 private long mRecordTime;//计时时间 56 private long mRecordTime;//计时时间
47 private boolean firstTimeFlag;//是否是首次计时 57 private boolean firstTimeFlag;//是否是首次计时
48 private int timeCountDown;//时间倒计时 58 private int timeCountDown;//时间倒计时
49 -  
50 private String uid; 59 private String uid;
51 private boolean needWriteDataFlag = true;//是否需要将计时器基值写入到数据库 60 private boolean needWriteDataFlag = true;//是否需要将计时器基值写入到数据库
  61 + // 定位相关
  62 + private LocationClient mLocClient;
  63 + public MyLocationListenner myListener = new MyLocationListenner();
52 64
53 public RunMainFragmentView(RunMainFragment fragment) { 65 public RunMainFragmentView(RunMainFragment fragment) {
54 this.fragment = fragment; 66 this.fragment = fragment;
@@ -58,8 +70,44 @@ public class RunMainFragmentView implements MvpView { @@ -58,8 +70,44 @@ public class RunMainFragmentView implements MvpView {
58 return fragment == null ? null : fragment.getActivity(); 70 return fragment == null ? null : fragment.getActivity();
59 } 71 }
60 72
61 - public void showStartTimeTip() {  
62 - 73 + private void initLocationClient() {
  74 + // 定位初始化
  75 + mLocClient = new LocationClient(getContext());
  76 + mLocClient.registerLocationListener(myListener);
  77 + LocationClientOption option = new LocationClientOption();
  78 + option.setOpenGps(true); // 打开gps
  79 + //可选,设置返回经纬度坐标类型,默认GCJ02
  80 + //GCJ02:国测局坐标;
  81 + //BD09ll:百度经纬度坐标;
  82 + //BD09:百度墨卡托坐标;
  83 + //海外地区定位,无需设置坐标类型,统一返回WGS84类型坐标
  84 + option.setCoorType("gcj02"); // 设置坐标类型
  85 + //可选,默认false,设置是否开启Gps定位
  86 + option.setOpenGps(true);
  87 + //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者,该模式下开发者无需再关心定位间隔是多少,定位SDK本身发现位置变化就会及时回调给开发者
  88 + option.setOpenAutoNotifyMode();
  89 + //可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
  90 + //LocationMode.Hight_Accuracy:高精度;
  91 + //LocationMode. Battery_Saving:低功耗;
  92 + //LocationMode. Device_Sensors:仅使用设备;
  93 + option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);
  94 + //可选,设置是否需要地址信息,默认不需要
  95 + option.setIsNeedAddress(false);
  96 + //可选,设置是否需要地址描述
  97 + option.setIsNeedLocationDescribe(false);
  98 + //可选,设置是否需要设备方向结果
  99 + option.setNeedDeviceDirect(false);
  100 + //设置打开自动回调位置模式,该开关打开后,期间只要定位SDK检测到位置变化就会主动回调给开发者
  101 + //minTimeInterval - 最短定位时间间隔,单位毫秒,最小值0,开发者可以在设置希望的位置回调最短时间间隔
  102 + //minDistance - 最短定位距离间隔,单位米,最小值0,开发者可以设置希望的位置回调距离间隔
  103 + //locSensitivity - 定位变化敏感程度,LOC_SENSITIVITY_HIGHT,LOC_SENSITIVITY_MIDDLE,LOC_SENSITIVITY_LOW
  104 + option.setOpenAutoNotifyMode(3000, 1, LocationClientOption.LOC_SENSITIVITY_HIGHT);
  105 + //可选,定位SDK内部是一个service,并放到了独立进程。
  106 + //设置是否在stop的时候杀死这个进程,默认(建议)不杀死,即setIgnoreKillProcess(true)
  107 + option.setIgnoreKillProcess(true);
  108 +
  109 + mLocClient.setLocOption(option);
  110 + mLocClient.start();
63 } 111 }
64 112
65 /** 113 /**
@@ -68,6 +116,7 @@ public class RunMainFragmentView implements MvpView { @@ -68,6 +116,7 @@ public class RunMainFragmentView implements MvpView {
68 public void initView() { 116 public void initView() {
69 uid = "yangshuai"; 117 uid = "yangshuai";
70 CommonInfo.setUserId(getContext(), uid); 118 CommonInfo.setUserId(getContext(), uid);
  119 + initLocationClient();
71 fragment.binding.llRunMainRoot.setVisibility(View.GONE); 120 fragment.binding.llRunMainRoot.setVisibility(View.GONE);
72 ButtonAnimUtil.startAnimation(fragment.binding.llStartTimeTip, false); 121 ButtonAnimUtil.startAnimation(fragment.binding.llStartTimeTip, false);
73 firstTimeFlag = true; 122 firstTimeFlag = true;
@@ -438,6 +487,81 @@ public class RunMainFragmentView implements MvpView { @@ -438,6 +487,81 @@ public class RunMainFragmentView implements MvpView {
438 } 487 }
439 488
440 489
  490 + /**
  491 + * //设置定位监听器,获取到用户当前位置 杨帅
  492 + * 定位SDK监听函数
  493 + */
  494 + public class MyLocationListenner extends BDAbstractLocationListener {
  495 +
  496 +
  497 + @Override
  498 + public void onReceiveLocation(BDLocation location) {
  499 + if (location == null) {
  500 + return;
  501 + }
  502 + //正在搜索GPS信号
  503 + if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_UNKNOWN) {
  504 + if (!getContext().getString(R.string.loc_gps_accuracy_unknown).equals(fragment.binding.tvLookTrace.getText().toString())) {
  505 + fragment.binding.tvLookTrace.setText(getContext().getString(R.string.loc_gps_accuracy_unknown));
  506 + fragment.binding.tvLookTrace.setTextColor(getContext().getResources().getColor(R.color.red));
  507 + }
  508 + if (fragment.binding.tvLookTrace.getVisibility()!=View.VISIBLE){
  509 + fragment.binding.tvLookTrace.setVisibility(View.VISIBLE);
  510 + }
  511 + if (fragment.binding.ivGps.getTag()==null||!fragment.binding.ivGps.getTag().toString().equals("rt_training_gps_0")) {
  512 + fragment.binding.ivGps.setTag("rt_training_gps_0");
  513 + //设置图标
  514 + fragment.binding.ivGps.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_0));
  515 + }
  516 +
  517 +
  518 + }
  519 + //GPS 质量判断差
  520 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_BAD) {
  521 + if (!getContext().getString(R.string.loc_gps_accuracy_bad).equals(fragment.binding.tvLookTrace.getText().toString())) {
  522 + fragment.binding.tvLookTrace.setText(getContext().getString(R.string.loc_gps_accuracy_bad));
  523 + fragment.binding.tvLookTrace.setTextColor(getContext().getResources().getColor(R.color.text_gray99));
  524 +
  525 + }
  526 + if (fragment.binding.tvLookTrace.getVisibility()!=View.VISIBLE){
  527 + fragment.binding.tvLookTrace.setVisibility(View.VISIBLE);
  528 + }
  529 + if (fragment.binding.ivGps.getTag()==null||!fragment.binding.ivGps.getTag().toString().equals("GPS_ACCURACY_BAD")) {
  530 + fragment.binding.ivGps.setTag("GPS_ACCURACY_BAD");
  531 + //设置图标
  532 + fragment.binding.ivGps.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_1));
  533 + }
  534 + }
  535 + //GPS 质量判断中等
  536 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_MID) {
  537 + if (fragment.binding.tvLookTrace.getVisibility() == View.VISIBLE) {
  538 + fragment.binding.tvLookTrace.setVisibility(View.GONE);
  539 + }
  540 + if (fragment.binding.ivGps.getTag()==null||!fragment.binding.ivGps.getTag().toString().equals("GPS_ACCURACY_MID")) {
  541 + fragment.binding.ivGps.setTag("GPS_ACCURACY_MID");
  542 + //设置图标
  543 + fragment.binding.ivGps.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_2));
  544 + }
  545 + }//GPS 质量判断好
  546 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_GOOD) {
  547 + if (fragment.binding.tvLookTrace.getVisibility() == View.VISIBLE) {
  548 + fragment.binding.tvLookTrace.setVisibility(View.GONE);
  549 + }
  550 + if (fragment.binding.ivGps.getTag()==null||!fragment.binding.ivGps.getTag().toString().equals("GPS_ACCURACY_GOOD")) {
  551 + fragment.binding.ivGps.setTag("GPS_ACCURACY_GOOD");
  552 + //设置图标
  553 + fragment.binding.ivGps.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_3));
  554 + }
  555 + }
  556 + }
  557 + }
  558 +
  559 + public void onDestroy() {
  560 + if (mLocClient != null) {
  561 + mLocClient.stop();
  562 + }
  563 + }
441 } 564 }
442 565
443 566
  567 +
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
@@ -283,7 +283,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { @@ -283,7 +283,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
283 //设置定位模式, 默认为 LocationMode.NORMAL 普通态 283 //设置定位模式, 默认为 LocationMode.NORMAL 普通态
284 mCurrentMode = MyLocationConfiguration.LocationMode.NORMAL; 284 mCurrentMode = MyLocationConfiguration.LocationMode.NORMAL;
285 // 设置定位图标修改为自定义marker 285 // 设置定位图标修改为自定义marker
286 - Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(getContext(), BitmapFactory.decodeResource(getContext().getResources(), R.drawable.rt_ic_location), 40, 40); 286 + Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(getContext(), BitmapFactory.decodeResource(getContext().getResources(), R.drawable.rt_ic_location), 50, 50);
287 mCurrentMarker = BitmapDescriptorFactory.fromBitmap(pointBitmap); 287 mCurrentMarker = BitmapDescriptorFactory.fromBitmap(pointBitmap);
288 //设置定位蓝点精度圆圈的填充颜色为透明色 288 //设置定位蓝点精度圆圈的填充颜色为透明色
289 accuracyCircleFillColor = getContext().getResources().getColor(R.color.transparent); 289 accuracyCircleFillColor = getContext().getResources().getColor(R.color.transparent);
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunningMapFragmentView.java
@@ -245,6 +245,57 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener { @@ -245,6 +245,57 @@ public class RunningMapFragmentView implements MvpView, SensorEventListener {
245 if (location == null || mMapView == null) { 245 if (location == null || mMapView == null) {
246 return; 246 return;
247 } 247 }
  248 +
  249 + //正在搜索GPS信号
  250 + if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_UNKNOWN) {
  251 + if (fragment.binding.tvGpsPopBg.getVisibility() != View.VISIBLE) {
  252 + fragment.binding.tvGpsPopBg.setVisibility(View.VISIBLE);
  253 + }
  254 + if (!getContext().getResources().getString(R.string.loc_gps_accuracy_unknown).equals(fragment.binding.tvGpsPopBg.getText().toString())) {
  255 + fragment.binding.tvGpsPopBg.setText(getContext().getResources().getString(R.string.loc_gps_accuracy_unknown));
  256 + }
  257 + //设置图标
  258 + if (fragment.binding.ivGpsState.getTag() == null || !"GPS_ACCURACY_UNKNOWN".equals(fragment.binding.ivGpsState.getTag().toString())) {
  259 + fragment.binding.ivGpsState.setTag("GPS_ACCURACY_UNKNOWN");
  260 + fragment.binding.ivGpsState.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_0));
  261 + }
  262 + }
  263 + //GPS 质量判断差
  264 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_BAD) {
  265 + if (fragment.binding.tvGpsPopBg.getVisibility() != View.VISIBLE) {
  266 + fragment.binding.tvGpsPopBg.setVisibility(View.VISIBLE);
  267 + }
  268 + if (!getContext().getResources().getString(R.string.loc_gps_accuracy_bad).equals(fragment.binding.tvGpsPopBg.getText().toString())) {
  269 + fragment.binding.tvGpsPopBg.setText(getContext().getResources().getString(R.string.loc_gps_accuracy_bad));
  270 + }
  271 + //设置图标
  272 + if (fragment.binding.ivGpsState.getTag() == null || !"GPS_ACCURACY_BAD".equals(fragment.binding.ivGpsState.getTag().toString())) {
  273 + fragment.binding.ivGpsState.setTag("GPS_ACCURACY_BAD");
  274 + fragment.binding.ivGpsState.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_1));
  275 + }
  276 + }
  277 + //GPS 质量判断中等
  278 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_MID) {
  279 + if (fragment.binding.tvGpsPopBg.getVisibility() != View.GONE) {
  280 + fragment.binding.tvGpsPopBg.setVisibility(View.GONE);
  281 + }
  282 + //设置图标
  283 + if (fragment.binding.ivGpsState.getTag()== null || !"GPS_ACCURACY_MID".equals(fragment.binding.ivGpsState.getTag().toString())) {
  284 + fragment.binding.ivGpsState.setTag("GPS_ACCURACY_MID");
  285 + fragment.binding.ivGpsState.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_2));
  286 + }
  287 + }//GPS 质量判断好
  288 + else if (location.getGpsAccuracyStatus() == BDLocation.GPS_ACCURACY_GOOD) {
  289 + if (fragment.binding.tvGpsPopBg.getVisibility() != View.GONE) {
  290 + fragment.binding.tvGpsPopBg.setVisibility(View.GONE);
  291 + }
  292 + //设置图标
  293 + if (fragment.binding.ivGpsState.getTag() == null || !"GPS_ACCURACY_GOOD".equals(fragment.binding.ivGpsState.getTag().toString())) {
  294 + fragment.binding.ivGpsState.setTag("GPS_ACCURACY_GOOD");
  295 + fragment.binding.ivGpsState.setBackground(getContext().getResources().getDrawable(R.drawable.rt_training_gps_3));
  296 + }
  297 + }
  298 +
248 if (isFirstLoc) { 299 if (isFirstLoc) {
249 isFirstLoc = false; 300 isFirstLoc = false;
250 if (location.getRadius() > 20) { 301 if (location.getRadius() > 20) {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/service/StepService.java
@@ -356,11 +356,7 @@ public class StepService extends Service implements SensorEventListener { @@ -356,11 +356,7 @@ public class StepService extends Service implements SensorEventListener {
356 @SuppressLint("WrongConstant") 356 @SuppressLint("WrongConstant")
357 @Override 357 @Override
358 public int onStartCommand(Intent intent, int flags, int startId) { 358 public int onStartCommand(Intent intent, int flags, int startId) {
359 - if (intent.getStringExtra("userId") != null) {  
360 - userId = intent.getStringExtra("userId");  
361 - Log.e(TAG, "onStartCommand: 传入的用户:" + userId);  
362 - }  
363 -// userId = MySpHelper.getInstance(getApplicationContext(), Context.MODE_MULTI_PROCESS).getString("userId", ""); 359 + userId =CommonInfo.getUserId(getApplicationContext());
364 if (userId != null && !TextUtils.isEmpty(userId)) { 360 if (userId != null && !TextUtils.isEmpty(userId)) {
365 if (!EventBus.getDefault().isRegistered(this)) { 361 if (!EventBus.getDefault().isRegistered(this)) {
366 EventBus.getDefault().register(this); 362 EventBus.getDefault().register(this);
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/PedometerMainActivity.java
@@ -246,4 +246,5 @@ public class PedometerMainActivity extends QMUIFragmentActivity { @@ -246,4 +246,5 @@ public class PedometerMainActivity extends QMUIFragmentActivity {
246 public void onBackPressed() { 246 public void onBackPressed() {
247 return; 247 return;
248 } 248 }
  249 +
249 } 250 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
@@ -35,6 +35,7 @@ import java.util.List; @@ -35,6 +35,7 @@ import java.util.List;
35 */ 35 */
36 @Route(path = "/moudle_pedometer/RunRaceDetailActivity") 36 @Route(path = "/moudle_pedometer/RunRaceDetailActivity")
37 public class RunRaceDetailActivity extends QMUIFragmentActivity { 37 public class RunRaceDetailActivity extends QMUIFragmentActivity {
  38 + private QMUIFragment fragment;
38 39
39 @Override 40 @Override
40 protected int getContextViewId() { 41 protected int getContextViewId() {
@@ -49,11 +50,14 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { @@ -49,11 +50,14 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity {
49 boolean isRunStep = CommonInfo.getIsRunStepService(this); 50 boolean isRunStep = CommonInfo.getIsRunStepService(this);
50 //没有找到相关记录 51 //没有找到相关记录
51 if (!isRunStep) { 52 if (!isRunStep) {
52 - addFragment(new RunRaceDetailFragment()); 53 + fragment = new RunRaceDetailFragment();
53 } 54 }
54 //找到记录 55 //找到记录
55 else { 56 else {
56 - addFragment(new RunMainFragment()); 57 + fragment = new RunMainFragment();
  58 + }
  59 + if (fragment != null) {
  60 + addFragment(fragment);
57 } 61 }
58 } 62 }
59 63
@@ -71,4 +75,14 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { @@ -71,4 +75,14 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity {
71 75
72 } 76 }
73 } 77 }
  78 +
  79 + @Override
  80 + public void onBackPressed() {
  81 + super.onBackPressed();
  82 + if (fragment != null) {
  83 + if (fragment instanceof RunMainFragment) {
  84 + return;
  85 + }
  86 + }
  87 + }
74 } 88 }
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunMainFragment.java
@@ -68,6 +68,9 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr @@ -68,6 +68,9 @@ public class RunMainFragment extends QMUIFragment&lt;RunMainFragmentView, RunMainFr
68 if (EventBus.getDefault().isRegistered(this)) { 68 if (EventBus.getDefault().isRegistered(this)) {
69 EventBus.getDefault().unregister(this); 69 EventBus.getDefault().unregister(this);
70 } 70 }
  71 + if (getMvpView() != null) {
  72 + getMvpView().onDestroy();
  73 + }
71 } 74 }
72 75
73 @Override 76 @Override
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/fragment/RunningMapFragment.java
@@ -180,6 +180,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run @@ -180,6 +180,7 @@ public class RunningMapFragment extends QMUIFragment&lt;RunningMapFragmentView, Run
180 if (EventBus.getDefault().isRegistered(this)) { 180 if (EventBus.getDefault().isRegistered(this)) {
181 EventBus.getDefault().unregister(this); 181 EventBus.getDefault().unregister(this);
182 } 182 }
  183 +
183 } 184 }
184 185
185 @Subscribe(threadMode = ThreadMode.MAIN) 186 @Subscribe(threadMode = ThreadMode.MAIN)
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/MyMapUtil.java
@@ -103,7 +103,7 @@ public class MyMapUtil { @@ -103,7 +103,7 @@ public class MyMapUtil {
103 } 103 }
104 //只有一个点 104 //只有一个点
105 if (points.size() == 1) { 105 if (points.size() == 1) {
106 - Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 40, 40); 106 + Bitmap pointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 10, 16);
107 OverlayOptions startOptions = new MarkerOptions().position(points.get(0)).icon(BitmapDescriptorFactory.fromBitmap(pointBitmap)); 107 OverlayOptions startOptions = new MarkerOptions().position(points.get(0)).icon(BitmapDescriptorFactory.fromBitmap(pointBitmap));
108 // .zIndex(9).draggable(true); 108 // .zIndex(9).draggable(true);
109 return baiduMap.addOverlay(startOptions); 109 return baiduMap.addOverlay(startOptions);
@@ -120,7 +120,7 @@ public class MyMapUtil { @@ -120,7 +120,7 @@ public class MyMapUtil {
120 } 120 }
121 121
122 // 添加起点图标 122 // 添加起点图标
123 - Bitmap startPointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 40, 40); 123 + Bitmap startPointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), startIconRes), 30, 36);
124 OverlayOptions startOptions = new MarkerOptions() 124 OverlayOptions startOptions = new MarkerOptions()
125 .position(startPoint) 125 .position(startPoint)
126 .icon(BitmapDescriptorFactory.fromBitmap(startPointBitmap)) 126 .icon(BitmapDescriptorFactory.fromBitmap(startPointBitmap))
@@ -129,11 +129,12 @@ public class MyMapUtil { @@ -129,11 +129,12 @@ public class MyMapUtil {
129 ; 129 ;
130 // .zIndex(9).draggable(true); 130 // .zIndex(9).draggable(true);
131 // 添加终点图标 131 // 添加终点图标
132 - Bitmap endPointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), endIconRes), 40, 40); 132 + Bitmap endPointBitmap = BitmapUtil.getBitmapFromDp(context, BitmapFactory.decodeResource(context.getResources(), endIconRes), 30, 36);
133 OverlayOptions endOptions = new MarkerOptions() 133 OverlayOptions endOptions = new MarkerOptions()
134 .position(endPoint) 134 .position(endPoint)
135 .icon(BitmapDescriptorFactory.fromBitmap(endPointBitmap)) 135 .icon(BitmapDescriptorFactory.fromBitmap(endPointBitmap))
136 .perspective(false) 136 .perspective(false)
  137 + .anchor(0.6f,0.96f)
137 .animateType(MarkerOptions.MarkerAnimateType.grow); 138 .animateType(MarkerOptions.MarkerAnimateType.grow);
138 // .zIndex(9).draggable(true); 139 // .zIndex(9).draggable(true);
139 140
moudle_pedometer/src/main/res/drawable-hdpi/circle_white_shadow_bg.png 0 → 100644

2.03 KB

moudle_pedometer/src/main/res/drawable-hdpi/gps_tip_bg.png 0 → 100644

1.38 KB

moudle_pedometer/src/main/res/drawable-hdpi/gps_white_shadow.png 0 → 100644

1.62 KB

moudle_pedometer/src/main/res/drawable-hdpi/icon_end.png

6.57 KB | W: | H:

2.85 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
moudle_pedometer/src/main/res/drawable-hdpi/icon_start.png

5.93 KB | W: | H:

2.97 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_location.png 0 → 100644

5.19 KB

moudle_pedometer/src/main/res/drawable-hdpi/rt_ic_location.webp deleted 100644 → 0
No preview for this file type
moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_0.png 0 → 100644

414 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_1.png 0 → 100644

306 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_2.png 0 → 100644

440 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/rt_training_gps_3.png 0 → 100644

444 Bytes

moudle_pedometer/src/main/res/drawable-hdpi/white_shadow_bg.png 0 → 100644

6.33 KB

moudle_pedometer/src/main/res/drawable-xhdpi/circle_white_shadow_bg.png 0 → 100644

2.44 KB

moudle_pedometer/src/main/res/drawable-xhdpi/gps_tip_bg.png 0 → 100644

1.89 KB

moudle_pedometer/src/main/res/drawable-xhdpi/gps_white_shadow.png 0 → 100644

1.99 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_end.png 0 → 100644

3.58 KB

moudle_pedometer/src/main/res/drawable-xhdpi/icon_start.png 0 → 100644

3.73 KB

moudle_pedometer/src/main/res/drawable-xhdpi/rt_ic_location.png 0 → 100644

5.19 KB

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_0.png 0 → 100644

146 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_1.png 0 → 100644

133 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_2.png 0 → 100644

212 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/rt_training_gps_3.png 0 → 100644

188 Bytes

moudle_pedometer/src/main/res/drawable-xhdpi/white_shadow_bg.png 0 → 100644

9.53 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/circle_white_shadow_bg.png 0 → 100644

4.66 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/gps_tip_bg.png 0 → 100644

3.54 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/gps_white_shadow.png 0 → 100644

3.79 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_end.png 0 → 100644

6.98 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/icon_start.png 0 → 100644

7.3 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_ic_location.png 0 → 100644

5.19 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_0.png 0 → 100644

501 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_1.png 0 → 100644

384 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_2.png 0 → 100644

723 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/rt_training_gps_3.png 0 → 100644

636 Bytes

moudle_pedometer/src/main/res/drawable-xxhdpi/white_shadow_bg.png 0 → 100644

18.7 KB

moudle_pedometer/src/main/res/drawable/layer_gps_shadow.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
  3 +
  4 + <!--边-->
  5 + <item>
  6 + <shape android:shape="rectangle">
  7 + <padding
  8 + android:bottom="3px"
  9 + android:left="2px"
  10 + android:right="2px"
  11 + android:top="2px" />
  12 +
  13 + <solid android:color="#00eeeeee" />
  14 +
  15 + <corners android:radius="50dp" />
  16 + </shape>
  17 + </item>
  18 + <item>
  19 + <shape android:shape="rectangle">
  20 + <padding
  21 + android:bottom="3px"
  22 + android:left="2px"
  23 + android:right="2px"
  24 + android:top="2px" />
  25 +
  26 + <solid android:color="#0Deeeeee" />
  27 +
  28 + <corners android:radius="50dp" />
  29 + </shape>
  30 + </item>
  31 + <item>
  32 + <shape android:shape="rectangle">
  33 + <padding
  34 + android:bottom="3px"
  35 + android:left="2px"
  36 + android:right="2px"
  37 + android:top="2px" />
  38 + <solid android:color="#0D4F4F4F" />
  39 + <corners android:radius="50dp" />
  40 + </shape>
  41 + </item>
  42 + <item>
  43 + <shape android:shape="rectangle">
  44 + <padding
  45 + android:bottom="3px"
  46 + android:left="2px"
  47 + android:right="2px"
  48 + android:top="2px" />
  49 + <solid android:color="#0D4F4F4F" />
  50 + <corners android:radius="50dp" />
  51 + </shape>
  52 + </item>
  53 + <item>
  54 + <shape android:shape="rectangle">
  55 + <padding
  56 + android:bottom="3px"
  57 + android:left="2px"
  58 + android:right="2px"
  59 + android:top="2px" />
  60 + <solid android:color="#1A4F4F4F" />
  61 + <corners android:radius="50dp" />
  62 + </shape>
  63 + </item>
  64 +
  65 + <!--中心背景 -->
  66 + <item>
  67 + <shape
  68 + android:shape="rectangle"
  69 + android:useLevel="false">
  70 + <!--实心 -->
  71 + <solid android:color="@color/white" />
  72 + <corners android:radius="50dp" />
  73 + <size
  74 + android:width="32dp"
  75 + android:height="32dp" />
  76 +
  77 + </shape>
  78 + </item>
  79 +
  80 +</layer-list>
0 \ No newline at end of file 81 \ No newline at end of file
moudle_pedometer/src/main/res/drawable/layer_shadow.xml
@@ -5,64 +5,64 @@ @@ -5,64 +5,64 @@
5 <item> 5 <item>
6 <shape android:shape="rectangle"> 6 <shape android:shape="rectangle">
7 <padding 7 <padding
8 - android:bottom="7px"  
9 - android:left="7px"  
10 - android:right="7px"  
11 - android:top="5px" />  
12 -  
13 - <solid android:color="#00eeeeee" />  
14 - 8 + android:bottom="6px"
  9 + android:left="3px"
  10 + android:right="3px"
  11 + android:top="3px" />
  12 + <solid android:color="#0DF8F8FF" />
15 <corners android:radius="5dp" /> 13 <corners android:radius="5dp" />
16 </shape> 14 </shape>
17 </item> 15 </item>
18 <item> 16 <item>
19 <shape android:shape="rectangle"> 17 <shape android:shape="rectangle">
20 <padding 18 <padding
21 - android:bottom="7px"  
22 - android:left="7px"  
23 - android:right="7px"  
24 - android:top="5px" />  
25 -  
26 - <solid android:color="#0Deeeeee" />  
27 - 19 + android:bottom="6px"
  20 + android:left="3px"
  21 + android:right="3px"
  22 + android:top="3px" />
  23 + <solid android:color="#0DE8E8E8" />
28 <corners android:radius="5dp" /> 24 <corners android:radius="5dp" />
29 </shape> 25 </shape>
30 </item> 26 </item>
31 <item> 27 <item>
32 <shape android:shape="rectangle"> 28 <shape android:shape="rectangle">
33 <padding 29 <padding
34 - android:bottom="7px"  
35 - android:left="7px"  
36 - android:right="7px"  
37 - android:top="5px" />  
38 - <solid android:color="#0Deeeeee" /> 30 + android:bottom="6px"
  31 + android:left="3px"
  32 + android:right="3px"
  33 + android:top="3px" />
  34 + <solid android:color="#0DCFCFCF" />
  35 +
39 <corners android:radius="5dp" /> 36 <corners android:radius="5dp" />
40 </shape> 37 </shape>
41 </item> 38 </item>
42 <item> 39 <item>
43 <shape android:shape="rectangle"> 40 <shape android:shape="rectangle">
44 <padding 41 <padding
45 - android:bottom="7px"  
46 - android:left="7px"  
47 - android:right="7px"  
48 - android:top="5px" />  
49 - <solid android:color="#0Deeeeee" /> 42 + android:bottom="6px"
  43 + android:left="3px"
  44 + android:right="3px"
  45 + android:top="3px" />
  46 + <solid android:color="#0DB5B5B5" />
50 <corners android:radius="5dp" /> 47 <corners android:radius="5dp" />
51 </shape> 48 </shape>
52 </item> 49 </item>
53 <item> 50 <item>
54 <shape android:shape="rectangle"> 51 <shape android:shape="rectangle">
55 <padding 52 <padding
56 - android:bottom="7px"  
57 - android:left="7px"  
58 - android:right="7px"  
59 - android:top="5px" /> 53 + android:bottom="6px"
  54 + android:left="3px"
  55 + android:right="3px"
  56 + android:top="3px" />
  57 +
  58 + <solid android:color="#0D9C9C9C" />
60 59
61 - <solid android:color="#0Deeeeee" />  
62 <corners android:radius="5dp" /> 60 <corners android:radius="5dp" />
63 </shape> 61 </shape>
64 </item> 62 </item>
65 63
  64 +
  65 +
66 <!--中心背景 --> 66 <!--中心背景 -->
67 <item> 67 <item>
68 <shape 68 <shape
moudle_pedometer/src/main/res/drawable/shape_30dp_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 android:radius="50dp" />
  5 +</shape>
0 \ No newline at end of file 6 \ No newline at end of file
moudle_pedometer/src/main/res/layout/fragment_run_main.xml
@@ -79,24 +79,47 @@ @@ -79,24 +79,47 @@
79 android:textSize="18sp" 79 android:textSize="18sp"
80 android:textStyle="bold" /> 80 android:textStyle="bold" />
81 81
  82 + <ImageView
  83 + android:id="@+id/iv_gps"
  84 + android:layout_width="18dp"
  85 + android:layout_height="5dp"
  86 + android:layout_centerVertical="true"
  87 + android:layout_marginLeft="5dp"
  88 + android:layout_toRightOf="@id/tv_gps"
  89 + />
  90 +
82 <TextView 91 <TextView
83 android:id="@+id/tv_look_trace" 92 android:id="@+id/tv_look_trace"
84 android:layout_width="wrap_content" 93 android:layout_width="wrap_content"
85 android:layout_height="wrap_content" 94 android:layout_height="wrap_content"
86 android:layout_centerVertical="true" 95 android:layout_centerVertical="true"
87 - android:layout_marginLeft="15dp"  
88 - android:layout_toRightOf="@id/tv_gps"  
89 - android:text="(点击查看轨迹)"  
90 - android:textColor="@color/text_gray" 96 + android:layout_marginLeft="5dp"
  97 + android:layout_toRightOf="@id/iv_gps"
  98 + android:textColor="@color/text_gray99"
91 android:textSize="12sp" 99 android:textSize="12sp"
92 android:textStyle="bold" /> 100 android:textStyle="bold" />
93 101
94 - <ImageView  
95 - android:layout_width="55dp"  
96 - android:layout_height="55dp" 102 + <LinearLayout
  103 + android:layout_width="wrap_content"
  104 + android:layout_height="wrap_content"
97 android:layout_alignParentRight="true" 105 android:layout_alignParentRight="true"
98 android:layout_marginRight="15dp" 106 android:layout_marginRight="15dp"
99 - android:src="@drawable/rt_ic_home_map" /> 107 + android:gravity="center"
  108 + android:orientation="vertical">
  109 +
  110 + <ImageView
  111 + android:layout_width="55dp"
  112 + android:layout_height="55dp"
  113 + android:src="@drawable/rt_ic_home_map" />
  114 +
  115 + <TextView
  116 + android:layout_width="wrap_content"
  117 + android:layout_height="wrap_content"
  118 + android:layout_marginTop="5dp"
  119 + android:text="点击查看轨迹"
  120 + android:textColor="@color/text_gray99"
  121 + android:textSize="10sp" />
  122 + </LinearLayout>
100 </RelativeLayout> 123 </RelativeLayout>
101 <!--计时--> 124 <!--计时-->
102 <LinearLayout 125 <LinearLayout
@@ -139,7 +162,7 @@ @@ -139,7 +162,7 @@
139 android:layout_marginTop="5dp" 162 android:layout_marginTop="5dp"
140 android:gravity="center" 163 android:gravity="center"
141 android:text="配速" 164 android:text="配速"
142 - android:textColor="@color/text_gray" 165 + android:textColor="@color/text_gray99"
143 android:textSize="15sp" 166 android:textSize="15sp"
144 android:textStyle="bold" /> 167 android:textStyle="bold" />
145 </LinearLayout> 168 </LinearLayout>
@@ -172,7 +195,7 @@ @@ -172,7 +195,7 @@
172 android:layout_marginTop="5dp" 195 android:layout_marginTop="5dp"
173 android:gravity="center" 196 android:gravity="center"
174 android:text="用时" 197 android:text="用时"
175 - android:textColor="@color/text_gray" 198 + android:textColor="@color/text_gray99"
176 android:textSize="15sp" 199 android:textSize="15sp"
177 android:textStyle="bold" /> 200 android:textStyle="bold" />
178 </LinearLayout> 201 </LinearLayout>
@@ -206,7 +229,7 @@ @@ -206,7 +229,7 @@
206 android:layout_marginTop="5dp" 229 android:layout_marginTop="5dp"
207 android:gravity="center" 230 android:gravity="center"
208 android:text="步" 231 android:text="步"
209 - android:textColor="@color/text_gray" 232 + android:textColor="@color/text_gray99"
210 android:textSize="15sp" 233 android:textSize="15sp"
211 android:textStyle="bold" /> 234 android:textStyle="bold" />
212 </LinearLayout> 235 </LinearLayout>
moudle_pedometer/src/main/res/layout/fragment_running_map.xml
@@ -11,11 +11,21 @@ @@ -11,11 +11,21 @@
11 android:layout_width="match_parent" 11 android:layout_width="match_parent"
12 android:layout_height="match_parent"></com.baidu.mapapi.map.MapView> 12 android:layout_height="match_parent"></com.baidu.mapapi.map.MapView>
13 13
  14 + <!--地图上面加一层类似于全透明黑色蒙版-->
  15 + <LinearLayout
  16 + android:layout_width="match_parent"
  17 + android:layout_height="match_parent"
  18 + android:background="#0D000000"
  19 + android:clickable="false"
  20 + android:focusable="false"
  21 + android:focusableInTouchMode="false"></LinearLayout>
  22 +
14 <FrameLayout 23 <FrameLayout
15 android:id="@+id/fl_back" 24 android:id="@+id/fl_back"
16 - android:layout_width="55dp"  
17 - android:layout_height="55dp"  
18 - android:background="@drawable/button_fab_white" 25 + android:layout_width="40dp"
  26 + android:layout_height="40dp"
  27 + android:layout_margin="10dp"
  28 + android:background="@drawable/circle_white_shadow_bg"
19 android:focusable="true"> 29 android:focusable="true">
20 30
21 <ImageView 31 <ImageView
@@ -23,11 +33,57 @@ @@ -23,11 +33,57 @@
23 android:layout_height="20dp" 33 android:layout_height="20dp"
24 android:layout_gravity="center" 34 android:layout_gravity="center"
25 android:layout_marginLeft="-2dp" 35 android:layout_marginLeft="-2dp"
  36 + android:layout_marginBottom="3dp"
26 android:background="@drawable/icon_back" 37 android:background="@drawable/icon_back"
27 android:focusable="false" /> 38 android:focusable="false" />
28 </FrameLayout> 39 </FrameLayout>
29 40
30 <LinearLayout 41 <LinearLayout
  42 + android:layout_width="wrap_content"
  43 + android:layout_height="wrap_content"
  44 + android:layout_gravity="top|right"
  45 + android:layout_marginTop="20dp"
  46 + android:layout_marginRight="10dp"
  47 + android:orientation="vertical">
  48 +
  49 + <LinearLayout
  50 + android:layout_width="75dp"
  51 + android:layout_height="30dp"
  52 + android:layout_gravity="right"
  53 + android:background="@drawable/gps_white_shadow"
  54 + android:gravity="center">
  55 +
  56 + <TextView
  57 + android:layout_width="wrap_content"
  58 + android:layout_height="wrap_content"
  59 + android:layout_marginBottom="3dp"
  60 + android:text="GPS"
  61 + android:textColor="@color/text_black"
  62 + android:textSize="12sp"
  63 + android:textStyle="bold" />
  64 +
  65 + <ImageView
  66 + android:id="@+id/iv_gps_state"
  67 + android:layout_width="18dp"
  68 + android:layout_height="5dp"
  69 + android:layout_marginLeft="5dp"
  70 + android:layout_marginBottom="3dp" />
  71 + </LinearLayout>
  72 + <!---->
  73 + <TextView
  74 + android:id="@+id/tv_gps_pop_bg"
  75 + android:layout_width="150dp"
  76 + android:layout_height="40dp"
  77 + android:layout_marginTop="-5dp"
  78 + android:background="@drawable/gps_tip_bg"
  79 + android:gravity="center"
  80 + android:textColor="@color/text_black"
  81 + android:textSize="10sp"
  82 + android:visibility="gone" />
  83 + <!---->
  84 + </LinearLayout>
  85 +
  86 + <LinearLayout
31 android:layout_width="match_parent" 87 android:layout_width="match_parent"
32 android:layout_height="wrap_content" 88 android:layout_height="wrap_content"
33 android:layout_gravity="bottom" 89 android:layout_gravity="bottom"
@@ -35,32 +91,33 @@ @@ -35,32 +91,33 @@
35 91
36 <FrameLayout 92 <FrameLayout
37 android:id="@+id/fl_location" 93 android:id="@+id/fl_location"
38 - android:layout_width="55dp"  
39 - android:layout_height="55dp" 94 + android:layout_width="40dp"
  95 + android:layout_height="40dp"
  96 + android:layout_marginLeft="10dp"
40 android:layout_marginBottom="20dp" 97 android:layout_marginBottom="20dp"
41 - android:background="@drawable/button_fab_white" 98 + android:background="@drawable/circle_white_shadow_bg"
42 android:focusable="true"> 99 android:focusable="true">
43 100
44 <ImageView 101 <ImageView
45 android:layout_width="20dp" 102 android:layout_width="20dp"
46 android:layout_height="20dp" 103 android:layout_height="20dp"
47 android:layout_gravity="center" 104 android:layout_gravity="center"
  105 + android:layout_marginBottom="3dp"
48 android:background="@drawable/rt_ic_location_blank" 106 android:background="@drawable/rt_ic_location_blank"
49 android:focusable="false" /> 107 android:focusable="false" />
50 </FrameLayout> 108 </FrameLayout>
51 109
52 <LinearLayout 110 <LinearLayout
53 android:layout_width="match_parent" 111 android:layout_width="match_parent"
54 - android:layout_height="100dp"  
55 - android:layout_marginLeft="10dp"  
56 - android:layout_marginRight="10dp"  
57 - android:layout_marginBottom="20dp"  
58 - android:background="@drawable/shape_10dp_white_raduis_bg"> 112 + android:layout_height="130dp"
  113 + android:layout_marginBottom="10dp"
  114 + android:background="@drawable/white_shadow_bg"
  115 + android:scaleX="1.02">
59 116
60 <LinearLayout 117 <LinearLayout
61 android:layout_width="0dp" 118 android:layout_width="0dp"
62 android:layout_height="match_parent" 119 android:layout_height="match_parent"
63 - android:layout_weight="1" 120 + android:layout_weight="1.2"
64 android:gravity="center" 121 android:gravity="center"
65 android:orientation="vertical" 122 android:orientation="vertical"
66 android:paddingLeft="5dp" 123 android:paddingLeft="5dp"
@@ -87,7 +144,7 @@ @@ -87,7 +144,7 @@
87 <LinearLayout 144 <LinearLayout
88 android:layout_width="0dp" 145 android:layout_width="0dp"
89 android:layout_height="match_parent" 146 android:layout_height="match_parent"
90 - android:layout_weight="1.5" 147 + android:layout_weight="1.2"
91 android:gravity="center" 148 android:gravity="center"
92 android:orientation="vertical"> 149 android:orientation="vertical">
93 150
moudle_pedometer/src/main/res/layout/layout_run_detail_person_score.xml
@@ -7,11 +7,12 @@ @@ -7,11 +7,12 @@
7 <LinearLayout 7 <LinearLayout
8 android:layout_width="match_parent" 8 android:layout_width="match_parent"
9 android:layout_height="180dp" 9 android:layout_height="180dp"
10 - android:layout_marginLeft="1dp"  
11 - android:layout_marginRight="1dp"  
12 - android:layout_marginBottom="5dp"  
13 - android:background="@drawable/layer_shadow"  
14 - android:orientation="vertical"> 10 + android:background="@drawable/white_shadow_bg"
  11 + android:orientation="vertical"
  12 + android:paddingLeft="15dp"
  13 + android:paddingTop="5dp"
  14 + android:paddingRight="15dp"
  15 + android:paddingBottom="15dp">
15 16
16 <LinearLayout 17 <LinearLayout
17 android:layout_width="match_parent" 18 android:layout_width="match_parent"
moudle_pedometer/src/main/res/layout/layout_run_detail_rank.xml
@@ -11,11 +11,11 @@ @@ -11,11 +11,11 @@
11 <LinearLayout 11 <LinearLayout
12 android:layout_width="match_parent" 12 android:layout_width="match_parent"
13 android:layout_height="150dp" 13 android:layout_height="150dp"
14 - android:layout_marginLeft="1dp"  
15 - android:layout_marginTop="10dp"  
16 - android:layout_marginRight="1dp"  
17 - android:layout_marginBottom="15dp"  
18 - android:background="@drawable/layer_shadow" 14 + android:paddingLeft="15dp"
  15 + android:paddingTop="5dp"
  16 + android:paddingRight="15dp"
  17 + android:paddingBottom="15dp"
  18 + android:background="@drawable/white_shadow_bg"
19 android:orientation="vertical"> 19 android:orientation="vertical">
20 20
21 <LinearLayout 21 <LinearLayout
moudle_pedometer/src/main/res/values/colors.xml
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
3 <color name="run_main_bg">#3D3745</color> 3 <color name="run_main_bg">#3D3745</color>
4 <color name="run_main_time_bg">#5BC4A4</color> 4 <color name="run_main_time_bg">#5BC4A4</color>
5 <color name="text_gray">#666666</color> 5 <color name="text_gray">#666666</color>
  6 + <color name="text_gray99">#999999</color>
  7 +
6 <color name="green_round">#5BC4A4</color> 8 <color name="green_round">#5BC4A4</color>
7 <color name="red_round">#F97070</color> 9 <color name="red_round">#F97070</color>
8 <color name="gray_round">#D6D6D6</color> 10 <color name="gray_round">#D6D6D6</color>
moudle_pedometer/src/main/res/values/strings.xml
@@ -63,5 +63,9 @@ @@ -63,5 +63,9 @@
63 <string name="all_time">累计用时</string> 63 <string name="all_time">累计用时</string>
64 <string name="has_take_part_line">我跑过的线路</string> 64 <string name="has_take_part_line">我跑过的线路</string>
65 <string name="chek_all_line">查看全部路线</string> 65 <string name="chek_all_line">查看全部路线</string>
  66 + <string name="loc_gps_accuracy_unknown">无信号,无法进行数据记录</string>
  67 + <string name="loc_gps_accuracy_bad">信号糟糕,数据准确度低</string>
  68 + <string name="loc_gps_accuracy_mid">GPS信号质量中等</string>
  69 + <string name="loc_gps_accuracy_good">GPS信号质量好</string>
66 <!----> 70 <!---->
67 </resources> 71 </resources>