Commit f0fb23d7b20844b834e198c1b387586812a3bd77
Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/ModulePedometer
Showing
7 changed files
with
63 additions
and
5 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/commonInfo/CommonInfo.java
| @@ -78,6 +78,25 @@ public class CommonInfo { | @@ -78,6 +78,25 @@ public class CommonInfo { | ||
| 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 | + /** | ||
| 82 | + * 设置赛事ID | ||
| 83 | + * | ||
| 84 | + * @param context | ||
| 85 | + * @param streetId | ||
| 86 | + */ | ||
| 87 | + public static void setStreetId(Context context, String streetId) { | ||
| 88 | + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putString("streetId", streetId); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + /** | ||
| 92 | + * 设置赛事ID | ||
| 93 | + * | ||
| 94 | + * @param context | ||
| 95 | + */ | ||
| 96 | + public static String getStreetId(Context context) { | ||
| 97 | + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getString("streetId", ""); | ||
| 98 | + } | ||
| 99 | + | ||
| 81 | /*重置 | 100 | /*重置 |
| 82 | * @param context | 101 | * @param context |
| 83 | */ | 102 | */ |
| @@ -87,4 +106,6 @@ public class CommonInfo { | @@ -87,4 +106,6 @@ public class CommonInfo { | ||
| 87 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runStepService"); | 106 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("runStepService"); |
| 88 | 107 | ||
| 89 | } | 108 | } |
| 109 | + | ||
| 110 | + | ||
| 90 | } | 111 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -133,7 +133,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -133,7 +133,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 133 | // //初始化地图点位 | 133 | // //初始化地图点位 |
| 134 | if (runRaceDetailInfo.getLatLongitude() != null) { | 134 | if (runRaceDetailInfo.getLatLongitude() != null) { |
| 135 | Log.e(TAG, "initView: 长度:" + runRaceDetailInfo.getLatLongitude().length()); | 135 | Log.e(TAG, "initView: 长度:" + runRaceDetailInfo.getLatLongitude().length()); |
| 136 | - trackPoints = GsonUtil.jsonToList(runRaceDetailInfo.getLatLongitude(), LatLng.class); | 136 | + trackPoints = GsonUtil.jsonToList(runRaceDetailInfo.getLatLongitude().trim(), LatLng.class); |
| 137 | Log.e(TAG, "initView: trackPoints" + trackPoints.size()); | 137 | Log.e(TAG, "initView: trackPoints" + trackPoints.size()); |
| 138 | MyMapUtil.drawServerLineTrack(getContext(), baiduMap, trackPoints, SortType.asc, R.color.green_round, R.drawable.icon_start, R.drawable.icon_end); | 138 | MyMapUtil.drawServerLineTrack(getContext(), baiduMap, trackPoints, SortType.asc, R.color.green_round, R.drawable.icon_start, R.drawable.icon_end); |
| 139 | //自动计算地图缩放 | 139 | //自动计算地图缩放 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/RunRaceDetailActivity.java
| @@ -40,6 +40,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | @@ -40,6 +40,7 @@ public class RunRaceDetailActivity extends QMUIFragmentActivity { | ||
| 40 | public static void startActivity(Activity activity, String eventId) { | 40 | public static void startActivity(Activity activity, String eventId) { |
| 41 | Intent intent = new Intent(activity, RunRaceDetailActivity.class); | 41 | Intent intent = new Intent(activity, RunRaceDetailActivity.class); |
| 42 | intent.putExtra("eventId", eventId); | 42 | intent.putExtra("eventId", eventId); |
| 43 | + CommonInfo.setStreetId(activity, eventId); | ||
| 43 | activity.startActivity(intent); | 44 | activity.startActivity(intent); |
| 44 | } | 45 | } |
| 45 | 46 |
moudle_pedometer/src/main/res/layout/fagment_collect_main.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<LinearLayout 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:orientation="vertical"> | ||
| 7 | + | ||
| 8 | + <com.qmuiteam.qmui.widget.QMUITopBar | ||
| 9 | + android:id="@+id/includeToolbar" | ||
| 10 | + style="@style/toolbarTitle" | ||
| 11 | + android:layout_width="match_parent" | ||
| 12 | + android:layout_height="?attr/qmui_topbar_height" | ||
| 13 | + android:fitsSystemWindows="true" | ||
| 14 | + app:qmui_layout_collapseMode="pin" | ||
| 15 | + app:qmui_topbar_bg_color="@color/color_7cbd83" | ||
| 16 | + app:qmui_topbar_need_separator="false" /> | ||
| 17 | + | ||
| 18 | + <com.baidu.mapapi.map.MapView | ||
| 19 | + android:layout_width="match_parent" | ||
| 20 | + android:layout_height="match_parent"></com.baidu.mapapi.map.MapView> | ||
| 21 | +</LinearLayout> | ||
| 0 | \ No newline at end of file | 22 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/layout_run_detail_street_introduce.xml
| @@ -39,10 +39,9 @@ | @@ -39,10 +39,9 @@ | ||
| 39 | <ImageView | 39 | <ImageView |
| 40 | android:id="@+id/iv_road_mao" | 40 | android:id="@+id/iv_road_mao" |
| 41 | android:layout_width="match_parent" | 41 | android:layout_width="match_parent" |
| 42 | - android:layout_height="500dp" | 42 | + android:layout_height="wrap_content" |
| 43 | android:layout_marginTop="10dp" | 43 | android:layout_marginTop="10dp" |
| 44 | android:layout_marginBottom="60dp" | 44 | android:layout_marginBottom="60dp" |
| 45 | - android:background="@drawable/map" | ||
| 46 | - android:scaleType="center" /> | 45 | + android:scaleType="fitCenter" /> |
| 47 | </LinearLayout> | 46 | </LinearLayout> |
| 48 | </layout> | 47 | </layout> |
| 49 | \ No newline at end of file | 48 | \ No newline at end of file |
moudle_pedometer/src/main/res/values/colors.xml
| @@ -32,4 +32,9 @@ | @@ -32,4 +32,9 @@ | ||
| 32 | 32 | ||
| 33 | <color name="text_black">#333333</color> | 33 | <color name="text_black">#333333</color> |
| 34 | <color name="bottom_sheet_dialog_race_location_text">#999999</color> | 34 | <color name="bottom_sheet_dialog_race_location_text">#999999</color> |
| 35 | + | ||
| 36 | + <color name="color_7cbd83">#7cbd83</color> | ||
| 37 | + <color name="s_topbar_btn_color">#333333</color> | ||
| 38 | + | ||
| 39 | + | ||
| 35 | </resources> | 40 | </resources> |
moudle_pedometer/src/main/res/values/styles.xml
| @@ -24,7 +24,7 @@ | @@ -24,7 +24,7 @@ | ||
| 24 | <item name="android:background">@android:color/transparent</item> | 24 | <item name="android:background">@android:color/transparent</item> |
| 25 | </style> | 25 | </style> |
| 26 | 26 | ||
| 27 | - <style name="ShareDialogStyle" > | 27 | + <style name="ShareDialogStyle"> |
| 28 | <item name="android:windowFrame">@null</item><!--边框--> | 28 | <item name="android:windowFrame">@null</item><!--边框--> |
| 29 | <item name="android:windowIsFloating">true</item><!--是否浮现在activity之上--> | 29 | <item name="android:windowIsFloating">true</item><!--是否浮现在activity之上--> |
| 30 | <item name="android:windowIsTranslucent">false</item><!--半透明--> | 30 | <item name="android:windowIsTranslucent">false</item><!--半透明--> |
| @@ -40,4 +40,15 @@ | @@ -40,4 +40,15 @@ | ||
| 40 | <item name="android:drawablePadding">5dp</item> | 40 | <item name="android:drawablePadding">5dp</item> |
| 41 | <item name="android:textColor">@drawable/rb_text_drawable_selector</item> | 41 | <item name="android:textColor">@drawable/rb_text_drawable_selector</item> |
| 42 | </style> | 42 | </style> |
| 43 | + | ||
| 44 | + <!----> | ||
| 45 | + <style name="toolbarTitle" parent="QMUI.TopBar"> | ||
| 46 | + <item name="qmui_topbar_separator_color">#c3c3c3</item> | ||
| 47 | + <item name="qmui_topbar_bg_color">@color/color_7cbd83</item> | ||
| 48 | + <item name="qmui_topbar_title_color">@color/qmui_config_color_white</item> | ||
| 49 | + <item name="qmui_topbar_subtitle_color">@color/qmui_config_color_white</item> | ||
| 50 | + <item name="qmui_topbar_text_btn_color_state_list">@color/s_topbar_btn_color</item> | ||
| 51 | + <item name="qmui_topbar_height">48dp</item> | ||
| 52 | + <item name="qmui_topbar_image_btn_height">48dp</item> | ||
| 53 | + </style> | ||
| 43 | </resources> | 54 | </resources> |