Commit 36654081a88bbe7dfe00731e01326b2748421e88
1 parent
97f82ce4
1 路径工具,打点页面逻辑
Showing
10 changed files
with
160 additions
and
23 deletions
moudle_pedometer/src/main/AndroidManifest.xml
| ... | ... | @@ -61,8 +61,7 @@ |
| 61 | 61 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.MyRecordActivity" /> |
| 62 | 62 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.ShareRecordActivity" /> |
| 63 | 63 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RaceRecordActivity" /> |
| 64 | - <activity | |
| 65 | - android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity"/> | |
| 64 | + <activity android:name="com.cnlive.moudle.pedometer.ui.activity.RegistrationInfoActivity" /> | |
| 66 | 65 | |
| 67 | 66 | <service |
| 68 | 67 | android:name="com.cnlive.moudle.pedometer.service.StepService" |
| ... | ... | @@ -117,16 +116,16 @@ |
| 117 | 116 | |
| 118 | 117 | <activity |
| 119 | 118 | android:name="com.cnlive.moudle.pedometer.ui.activity.PedometerMainActivity" |
| 120 | - android:launchMode="singleTask"/> | |
| 119 | + android:launchMode="singleTask" /> | |
| 121 | 120 | <activity |
| 122 | 121 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningMapActivity" |
| 123 | - android:launchMode="singleTask"/> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 122 | + android:launchMode="singleTask" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 124 | 123 | <activity |
| 125 | 124 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunRaceDetailActivity" |
| 126 | - android:launchMode="singleTask"/> | |
| 125 | + android:launchMode="singleTask" /> | |
| 127 | 126 | <activity |
| 128 | 127 | android:name="com.cnlive.moudle.pedometer.ui.activity.RunningFinishActivity" |
| 129 | - android:launchMode="singleTask"/> | |
| 128 | + android:launchMode="singleTask" /> | |
| 130 | 129 | <activity |
| 131 | 130 | android:name="com.cnlive.moudle.pedometer.ui.activity.UploadFailDetailActivity" |
| 132 | 131 | android:launchMode="singleTask" /> |
| ... | ... | @@ -138,6 +137,9 @@ |
| 138 | 137 | <activity |
| 139 | 138 | android:name="com.cnlive.moudle.pedometer.ui.activity.OnGoingActivity" |
| 140 | 139 | android:launchMode="singleTask" /> |
| 140 | + | |
| 141 | + <!--轨迹列表详情页--> | |
| 142 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollTraceListDetailActivity" /> | |
| 141 | 143 | <!--************************************************路径工具**********************************************--> |
| 142 | 144 | <service |
| 143 | 145 | android:name="com.cnlive.moudle.collectionTrace.service.CollKeepLiveService" |
| ... | ... | @@ -179,16 +181,11 @@ |
| 179 | 181 | </intent-filter> |
| 180 | 182 | </receiver> |
| 181 | 183 | |
| 182 | - <activity | |
| 183 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity"/> | |
| 184 | - <activity | |
| 185 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity"/> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 186 | - <activity | |
| 187 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity"/> | |
| 188 | - <activity | |
| 189 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity"/> | |
| 190 | - <activity | |
| 191 | - android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity"/> | |
| 184 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollPedometerMainActivity" /> | |
| 185 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity" /> <!-- android:theme="@style/Theme.AppCompat.Light.NoActionBar" --> | |
| 186 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunningMapActivity" /> | |
| 187 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity" /> | |
| 188 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity" /> | |
| 192 | 189 | </application> |
| 193 | 190 | |
| 194 | 191 | </manifest> |
| 195 | 192 | \ No newline at end of file | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningFinishFragmentView.java
| ... | ... | @@ -215,8 +215,8 @@ public class CollRunningFinishFragmentView implements MvpView, OnFenceListener { |
| 215 | 215 | @Override |
| 216 | 216 | public void run() { |
| 217 | 217 | if (null != collectLatLngs && collectLatLngs.size() > 1) { |
| 218 | -// getBaiDuSnap(); | |
| 219 | - addFence(); | |
| 218 | + getBaiDuSnap(); | |
| 219 | +// addFence(); | |
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | }, 1000); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningMapFragmentView.java
| ... | ... | @@ -378,6 +378,7 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener |
| 378 | 378 | CollStepUtil.setCollEndPointData(getContext(), CollCommonInfo.getUserId(getContext()), collectPoint); |
| 379 | 379 | //跳转界面 |
| 380 | 380 | CollRunningFinishActivity.startActivity(fragment.getActivity()); |
| 381 | + fragment.getActivity().finish(); | |
| 381 | 382 | } |
| 382 | 383 | }); |
| 383 | 384 | endSelectDialog.setCancelable(false); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollTraceListDetailFragmentView.java
| 1 | 1 | package com.cnlive.moudle.collectionTrace.frame.view; |
| 2 | 2 | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Context; | |
| 3 | 5 | import android.os.Handler; |
| 4 | 6 | import android.support.v7.widget.LinearLayoutManager; |
| 5 | 7 | import android.text.TextUtils; |
| ... | ... | @@ -12,6 +14,7 @@ import com.baidu.mapapi.map.Overlay; |
| 12 | 14 | import com.baidu.mapapi.map.UiSettings; |
| 13 | 15 | import com.baidu.mapapi.model.LatLng; |
| 14 | 16 | import com.baidu.trace.LBSTraceClient; |
| 17 | +import com.bumptech.glide.Glide; | |
| 15 | 18 | import com.cnlive.moudle.collectionTrace.model.CollectPoint; |
| 16 | 19 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 17 | 20 | import com.cnlive.moudle.collectionTrace.ui.adapter.CollFinishDetaiAdapter; |
| ... | ... | @@ -47,6 +50,9 @@ public class CollTraceListDetailFragmentView implements MvpView { |
| 47 | 50 | this.fragment = fragment; |
| 48 | 51 | } |
| 49 | 52 | |
| 53 | + public Context getContext() { | |
| 54 | + return fragment == null ? null : fragment.getActivity(); | |
| 55 | + } | |
| 50 | 56 | |
| 51 | 57 | public void initView(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean) { |
| 52 | 58 | if (mClient == null) { |
| ... | ... | @@ -59,8 +65,20 @@ public class CollTraceListDetailFragmentView implements MvpView { |
| 59 | 65 | //添加起点 |
| 60 | 66 | CollectPoint startPoint = null; |
| 61 | 67 | List<CollectPoint> resultCollectPoints = null; |
| 68 | + List<CollectPoint> allCollectPoints = null; | |
| 62 | 69 | if (!TextUtils.isEmpty(eventShoeLinesBean.getLatLongitude())) { |
| 63 | 70 | resultCollectPoints = GsonUtil.jsonToList(eventShoeLinesBean.getLatLongitude(), CollectPoint.class); |
| 71 | + allCollectPoints = GsonUtil.jsonToList(eventShoeLinesBean.getLatLongitude(), CollectPoint.class); | |
| 72 | + | |
| 73 | + } | |
| 74 | + //设置打点liebiao | |
| 75 | + if (null != allCollectPoints && allCollectPoints.size() > 1) { | |
| 76 | + //设置适配器 | |
| 77 | + adapter = new CollFinishDetaiAdapter(fragment.getActivity(), allCollectPoints); | |
| 78 | + fragment.binding.includeFinishUserInfo.rvList.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); | |
| 79 | + fragment.binding.includeFinishUserInfo.rvList.setAdapter(adapter); | |
| 80 | + } else { | |
| 81 | + fragment.binding.includeFinishUserInfo.rvList.setVisibility(View.GONE); | |
| 64 | 82 | } |
| 65 | 83 | //获取打点不为空 |
| 66 | 84 | if (null != resultCollectPoints && resultCollectPoints.size() > 1) { |
| ... | ... | @@ -68,6 +86,29 @@ public class CollTraceListDetailFragmentView implements MvpView { |
| 68 | 86 | resultCollectPoints.remove(0); |
| 69 | 87 | //移除终点 |
| 70 | 88 | resultCollectPoints.remove(resultCollectPoints.size() - 1); |
| 89 | + //开始在地图上绘制打点信息 | |
| 90 | + for (int i = 0; i < resultCollectPoints.size(); i++) { | |
| 91 | + LatLng latLng = new LatLng(resultCollectPoints.get(i).getLatitude(), resultCollectPoints.get(i).getLongitude()); | |
| 92 | + MyMapUtil.setMapMarker(getContext(), baiduMap, latLng, R.drawable.icon_map_import); | |
| 93 | + } | |
| 94 | + | |
| 95 | + } | |
| 96 | + | |
| 97 | + //设置用户头像 | |
| 98 | + if (!TextUtils.isEmpty(eventShoeLinesBean.getUserMsg().getNickName())) { | |
| 99 | + fragment.binding.includeFinishUserInfo.tvUserNickName.setText(eventShoeLinesBean.getUserMsg().getNickName()); | |
| 100 | + } | |
| 101 | + //设置用户头像 | |
| 102 | + if (!TextUtils.isEmpty(eventShoeLinesBean.getUserMsg().getImage())) { | |
| 103 | + Glide.with(getContext()).load(eventShoeLinesBean.getUserMsg().getImage()).into(fragment.binding.includeFinishUserInfo.qmIvIcon); | |
| 104 | + } | |
| 105 | + //设置用户行走公里 | |
| 106 | + if (!TextUtils.isEmpty(eventShoeLinesBean.getMileage())) { | |
| 107 | + fragment.binding.includeFinishUserInfo.tvDistance.setText(eventShoeLinesBean.getMileage()); | |
| 108 | + } | |
| 109 | + //设置日期 | |
| 110 | + if (!TextUtils.isEmpty(eventShoeLinesBean.getEndTime())) { | |
| 111 | + fragment.binding.includeFinishUserInfo.tvDate.setText(TimeUtil.getStampToTime(Long.parseLong(eventShoeLinesBean.getEndTime()) * 1000, "yyyy-MM-dd HH:mm")); | |
| 71 | 112 | } |
| 72 | 113 | |
| 73 | 114 | // //查询用户历史轨迹 | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceNameListView.java
| ... | ... | @@ -21,6 +21,7 @@ import com.baidu.trace.model.CoordType; |
| 21 | 21 | import com.cnlive.libs.base.util.AlertUtil; |
| 22 | 22 | import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo; |
| 23 | 23 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 24 | +import com.cnlive.moudle.collectionTrace.ui.activity.CollTraceListDetailActivity; | |
| 24 | 25 | import com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity; |
| 25 | 26 | import com.cnlive.moudle.collectionTrace.ui.adapter.RaceNameListAdapter; |
| 26 | 27 | import com.cnlive.moudle.collectionTrace.ui.fragment.RaceNameListFragment; |
| ... | ... | @@ -107,7 +108,7 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 107 | 108 | adapter.setOnItemClick(new RaceNameListAdapter.OnItemClick() { |
| 108 | 109 | @Override |
| 109 | 110 | public void onItemClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { |
| 110 | - | |
| 111 | + CollTraceListDetailActivity.startActivity(fragment.getActivity(), eventShoeLinesBean); | |
| 111 | 112 | } |
| 112 | 113 | }); |
| 113 | 114 | adapter.setOnAddShoeLineClick(new RaceNameListAdapter.OnAddShoeLineClick() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/model/RaceNameListInfo.java
| ... | ... | @@ -8,8 +8,9 @@ import java.util.List; |
| 8 | 8 | */ |
| 9 | 9 | public class RaceNameListInfo implements Serializable { |
| 10 | 10 | |
| 11 | + | |
| 11 | 12 | /** |
| 12 | - * eventShoeLines : [{"createTime":1560498861000,"darenId":"daren_10513196","endLocation":"首都师范大学操场西门","eventId":"116","id":120,"isEnable":0,"latLongitude":"[{\"latitude\":39.933942415657,\"latitudeE6\":3.9933942415657E7,\"longitude\":116.30897883196,\"longitudeE6\":1.1630897883196001E8},{\"latitude\":39.933967093082,\"latitudeE6\":3.9933967093082E7,\"longitude\":116.30890884739,\"longitudeE6\":1.1630890884739E8},{\"latitude\":39.93396191311,\"latitudeE6\":3.9933961913109995E7,\"longitude\":116.30868153328,\"longitudeE6\":1.1630868153328E8},{\"latitude\":39.934018604395,\"latitudeE6\":3.9934018604395E7,\"longitude\":116.30864816843,\"longitudeE6\":1.1630864816843E8},{\"latitude\":39.934091845914,\"latitudeE6\":3.9934091845914E7,\"longitude\":116.30864003053,\"longitudeE6\":1.1630864003053E8},{\"latitude\":39.934360142831,\"latitudeE6\":3.9934360142831E7,\"longitude\":116.30875016067,\"longitudeE6\":1.1630875016067E8},{\"latitude\":39.934744000269,\"latitudeE6\":3.9934744000268996E7,\"longitude\":116.30886056182,\"longitudeE6\":1.1630886056182E8},{\"latitude\":39.934760553353,\"latitudeE6\":3.9934760553353004E7,\"longitude\":116.30891047327,\"longitudeE6\":1.1630891047327E8},{\"latitude\":39.934696015943,\"latitudeE6\":3.9934696015943E7,\"longitude\":116.30912422473,\"longitudeE6\":1.1630912422473E8},{\"latitude\":39.934698216461,\"latitudeE6\":3.9934698216461E7,\"longitude\":116.30938815875,\"longitudeE6\":1.1630938815875E8},{\"latitude\":39.934731879794,\"latitudeE6\":3.9934731879794E7,\"longitude\":116.30961357404,\"longitudeE6\":1.1630961357404E8},{\"latitude\":39.934696892741,\"latitudeE6\":3.9934696892741E7,\"longitude\":116.30967053826,\"longitudeE6\":1.1630967053826E8},{\"latitude\":39.934370279617,\"latitudeE6\":3.9934370279617E7,\"longitude\":116.30962008478,\"longitudeE6\":1.1630962008478E8},{\"latitude\":39.934132111504,\"latitudeE6\":3.9934132111503996E7,\"longitude\":116.309668369,\"longitudeE6\":1.1630966836899999E8},{\"latitude\":39.933978571682,\"latitudeE6\":3.9933978571682E7,\"longitude\":116.30965182248,\"longitudeE6\":1.1630965182248001E8},{\"latitude\":39.933964707162,\"latitudeE6\":3.9933964707162E7,\"longitude\":116.3093930426,\"longitudeE6\":1.1630939304259999E8},{\"latitude\":39.933996146467,\"latitudeE6\":3.9933996146467E7,\"longitude\":116.30915080933,\"longitudeE6\":1.1630915080933E8}]","mileage":"5","roadmap":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560748589378&di=bb8468bcde8fbebe49e62c49e1a4312c&imgtype=0&src=http%3A%2F%2F05imgmini.eastday.com%2Fmobile%2F20190309%2F20190309100119_57a582d9807694bc008c102f91d01d13_3.jpeg","startLocation":"首都师范大学操场东门","updateTime":1560498861000}] | |
| 13 | + * eventShoeLines : [{"entityName":"yangshuai","startTime":"1560127625","endTime":"1560127625","createTime":1560498861000,"darenId":"daren_10513196","endLocation":"首都师范大学操场西门","eventId":"116","id":120,"isEnable":0,"latLongitude":"[{\"latitude\":39.933942415657,\"latitudeE6\":3.9933942415657E7,\"longitude\":116.30897883196,\"longitudeE6\":1.1630897883196001E8},{\"latitude\":39.933967093082,\"latitudeE6\":3.9933967093082E7,\"longitude\":116.30890884739,\"longitudeE6\":1.1630890884739E8},{\"latitude\":39.93396191311,\"latitudeE6\":3.9933961913109995E7,\"longitude\":116.30868153328,\"longitudeE6\":1.1630868153328E8},{\"latitude\":39.934018604395,\"latitudeE6\":3.9934018604395E7,\"longitude\":116.30864816843,\"longitudeE6\":1.1630864816843E8},{\"latitude\":39.934091845914,\"latitudeE6\":3.9934091845914E7,\"longitude\":116.30864003053,\"longitudeE6\":1.1630864003053E8},{\"latitude\":39.934360142831,\"latitudeE6\":3.9934360142831E7,\"longitude\":116.30875016067,\"longitudeE6\":1.1630875016067E8},{\"latitude\":39.934744000269,\"latitudeE6\":3.9934744000268996E7,\"longitude\":116.30886056182,\"longitudeE6\":1.1630886056182E8},{\"latitude\":39.934760553353,\"latitudeE6\":3.9934760553353004E7,\"longitude\":116.30891047327,\"longitudeE6\":1.1630891047327E8},{\"latitude\":39.934696015943,\"latitudeE6\":3.9934696015943E7,\"longitude\":116.30912422473,\"longitudeE6\":1.1630912422473E8},{\"latitude\":39.934698216461,\"latitudeE6\":3.9934698216461E7,\"longitude\":116.30938815875,\"longitudeE6\":1.1630938815875E8},{\"latitude\":39.934731879794,\"latitudeE6\":3.9934731879794E7,\"longitude\":116.30961357404,\"longitudeE6\":1.1630961357404E8},{\"latitude\":39.934696892741,\"latitudeE6\":3.9934696892741E7,\"longitude\":116.30967053826,\"longitudeE6\":1.1630967053826E8},{\"latitude\":39.934370279617,\"latitudeE6\":3.9934370279617E7,\"longitude\":116.30962008478,\"longitudeE6\":1.1630962008478E8},{\"latitude\":39.934132111504,\"latitudeE6\":3.9934132111503996E7,\"longitude\":116.309668369,\"longitudeE6\":1.1630966836899999E8},{\"latitude\":39.933978571682,\"latitudeE6\":3.9933978571682E7,\"longitude\":116.30965182248,\"longitudeE6\":1.1630965182248001E8},{\"latitude\":39.933964707162,\"latitudeE6\":3.9933964707162E7,\"longitude\":116.3093930426,\"longitudeE6\":1.1630939304259999E8},{\"latitude\":39.933996146467,\"latitudeE6\":3.9933996146467E7,\"longitude\":116.30915080933,\"longitudeE6\":1.1630915080933E8}]","mileage":"5","roadmap":"https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560748589378&di=bb8468bcde8fbebe49e62c49e1a4312c&imgtype=0&src=http%3A%2F%2F05imgmini.eastday.com%2Fmobile%2F20190309%2F20190309100119_57a582d9807694bc008c102f91d01d13_3.jpeg","startLocation":"首都师范大学操场东门","updateTime":1560498861000,"userMsg":{"image":"","nickName":""}}] | |
| 13 | 14 | * hasNext : false |
| 14 | 15 | */ |
| 15 | 16 | |
| ... | ... | @@ -32,8 +33,11 @@ public class RaceNameListInfo implements Serializable { |
| 32 | 33 | this.eventShoeLines = eventShoeLines; |
| 33 | 34 | } |
| 34 | 35 | |
| 35 | - public static class EventShoeLinesBean implements Serializable { | |
| 36 | + public static class EventShoeLinesBean implements Serializable{ | |
| 36 | 37 | /** |
| 38 | + * entityName : yangshuai | |
| 39 | + * startTime : 1560127625 | |
| 40 | + * endTime : 1560127625 | |
| 37 | 41 | * createTime : 1560498861000 |
| 38 | 42 | * darenId : daren_10513196 |
| 39 | 43 | * endLocation : 首都师范大学操场西门 |
| ... | ... | @@ -45,8 +49,12 @@ public class RaceNameListInfo implements Serializable { |
| 45 | 49 | * roadmap : https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1560748589378&di=bb8468bcde8fbebe49e62c49e1a4312c&imgtype=0&src=http%3A%2F%2F05imgmini.eastday.com%2Fmobile%2F20190309%2F20190309100119_57a582d9807694bc008c102f91d01d13_3.jpeg |
| 46 | 50 | * startLocation : 首都师范大学操场东门 |
| 47 | 51 | * updateTime : 1560498861000 |
| 52 | + * userMsg : {"image":"","nickName":""} | |
| 48 | 53 | */ |
| 49 | 54 | |
| 55 | + private String entityName; | |
| 56 | + private String startTime; | |
| 57 | + private String endTime; | |
| 50 | 58 | private long createTime; |
| 51 | 59 | private String darenId; |
| 52 | 60 | private String endLocation; |
| ... | ... | @@ -58,6 +66,31 @@ public class RaceNameListInfo implements Serializable { |
| 58 | 66 | private String roadmap; |
| 59 | 67 | private String startLocation; |
| 60 | 68 | private long updateTime; |
| 69 | + private UserMsgBean userMsg; | |
| 70 | + | |
| 71 | + public String getEntityName() { | |
| 72 | + return entityName; | |
| 73 | + } | |
| 74 | + | |
| 75 | + public void setEntityName(String entityName) { | |
| 76 | + this.entityName = entityName; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public String getStartTime() { | |
| 80 | + return startTime; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public void setStartTime(String startTime) { | |
| 84 | + this.startTime = startTime; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public String getEndTime() { | |
| 88 | + return endTime; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public void setEndTime(String endTime) { | |
| 92 | + this.endTime = endTime; | |
| 93 | + } | |
| 61 | 94 | |
| 62 | 95 | public long getCreateTime() { |
| 63 | 96 | return createTime; |
| ... | ... | @@ -146,5 +179,39 @@ public class RaceNameListInfo implements Serializable { |
| 146 | 179 | public void setUpdateTime(long updateTime) { |
| 147 | 180 | this.updateTime = updateTime; |
| 148 | 181 | } |
| 182 | + | |
| 183 | + public UserMsgBean getUserMsg() { | |
| 184 | + return userMsg; | |
| 185 | + } | |
| 186 | + | |
| 187 | + public void setUserMsg(UserMsgBean userMsg) { | |
| 188 | + this.userMsg = userMsg; | |
| 189 | + } | |
| 190 | + | |
| 191 | + public static class UserMsgBean implements Serializable { | |
| 192 | + /** | |
| 193 | + * image : | |
| 194 | + * nickName : | |
| 195 | + */ | |
| 196 | + | |
| 197 | + private String image; | |
| 198 | + private String nickName; | |
| 199 | + | |
| 200 | + public String getImage() { | |
| 201 | + return image; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public void setImage(String image) { | |
| 205 | + this.image = image; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public String getNickName() { | |
| 209 | + return nickName; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setNickName(String nickName) { | |
| 213 | + this.nickName = nickName; | |
| 214 | + } | |
| 215 | + } | |
| 149 | 216 | } |
| 150 | 217 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/activity/CollTraceListDetailActivity.java
| 1 | 1 | package com.cnlive.moudle.collectionTrace.ui.activity; |
| 2 | 2 | |
| 3 | +import android.app.Activity; | |
| 4 | +import android.content.Intent; | |
| 3 | 5 | import android.os.Bundle; |
| 4 | 6 | |
| 7 | +import com.cnlive.libs.base.ui.QMUIFragment; | |
| 5 | 8 | import com.cnlive.libs.base.ui.QMUIFragmentActivity; |
| 6 | 9 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 10 | +import com.cnlive.moudle.collectionTrace.ui.fragment.CollTraceListDetailFragment; | |
| 7 | 11 | import com.example.moudle_pedometer.R; |
| 8 | 12 | |
| 9 | 13 | /** |
| ... | ... | @@ -23,5 +27,21 @@ public class CollTraceListDetailActivity extends QMUIFragmentActivity { |
| 23 | 27 | protected void onCreate(Bundle savedInstanceState) { |
| 24 | 28 | super.onCreate(savedInstanceState); |
| 25 | 29 | eventShoeLinesBean = (RaceNameListInfo.EventShoeLinesBean) getIntent().getExtras().get("eventShoeLinesBean"); |
| 30 | + if (null != eventShoeLinesBean) { | |
| 31 | + addFragment(CollTraceListDetailFragment.newInstance(eventShoeLinesBean)); | |
| 32 | + } | |
| 33 | + } | |
| 34 | + | |
| 35 | + private void addFragment(QMUIFragment fragment) { | |
| 36 | + getSupportFragmentManager().beginTransaction() | |
| 37 | + .add(getContextViewId(), fragment, fragment.getClass().getSimpleName()) | |
| 38 | + .addToBackStack(fragment.getClass().getSimpleName()) | |
| 39 | + .commit(); | |
| 40 | + } | |
| 41 | + | |
| 42 | + public static void startActivity(Activity activity, RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean) { | |
| 43 | + Intent intent = new Intent(activity, CollTraceListDetailActivity.class); | |
| 44 | + intent.putExtra("eventShoeLinesBean", eventShoeLinesBean); | |
| 45 | + activity.startActivity(intent); | |
| 26 | 46 | } |
| 27 | 47 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/adapter/RunListAdapter.java
| ... | ... | @@ -59,7 +59,7 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo |
| 59 | 59 | public void onClick(View view) { |
| 60 | 60 | RunRaceDetailInfo runRaceDetailInfo = new RunRaceDetailInfo(); |
| 61 | 61 | runRaceDetailInfo.setTitle(list.get(i).getTitle()); |
| 62 | - RaceNameListActivity.newInstance(context, list.get(i).getId() + "",runRaceDetailInfo); | |
| 62 | + RaceNameListActivity.newInstance(context, list.get(i).getId() + "", runRaceDetailInfo); | |
| 63 | 63 | |
| 64 | 64 | } |
| 65 | 65 | }); |
| ... | ... | @@ -91,4 +91,8 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo |
| 91 | 91 | item_ly = itemView.findViewById(R.id.item_ly); |
| 92 | 92 | } |
| 93 | 93 | } |
| 94 | + | |
| 95 | + public interface OnItemClickListener { | |
| 96 | + void onClickItem(RunLineInfo.ListBean bean, int position); | |
| 97 | + } | |
| 94 | 98 | } | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/CollTraceListDetailFragment.java
| ... | ... | @@ -5,6 +5,7 @@ import android.support.annotation.Nullable; |
| 5 | 5 | import android.view.View; |
| 6 | 6 | |
| 7 | 7 | import com.cnlive.libs.base.ui.QMUIFragment; |
| 8 | +import com.cnlive.libs.base.util.StatusBarUtil2; | |
| 8 | 9 | import com.cnlive.moudle.collectionTrace.frame.presenter.CollTraceListDetailFragmentPresenter; |
| 9 | 10 | import com.cnlive.moudle.collectionTrace.frame.view.CollTraceListDetailFragmentView; |
| 10 | 11 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| ... | ... | @@ -45,10 +46,14 @@ public class CollTraceListDetailFragment extends QMUIFragment<CollTraceListDetai |
| 45 | 46 | @Override |
| 46 | 47 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { |
| 47 | 48 | super.onViewCreated(view, savedInstanceState); |
| 49 | + StatusBarUtil2.setColor(getActivity(), getResources().getColor(R.color.white), 0); | |
| 50 | + | |
| 48 | 51 | if (null != getArguments()) { |
| 49 | 52 | eventShoeLinesBean = (RaceNameListInfo.EventShoeLinesBean) getArguments().get("eventShoeLinesBean"); |
| 50 | 53 | if (null != eventShoeLinesBean) { |
| 51 | - | |
| 54 | + if (null != getMvpView()) { | |
| 55 | + getMvpView().initView(eventShoeLinesBean); | |
| 56 | + } | |
| 52 | 57 | } |
| 53 | 58 | } |
| 54 | 59 | } | ... | ... |
moudle_pedometer/src/main/res/layout/layout_coll_finish_user_info.xml