Commit c0c5dec35b399eb7c6a30ef4e2293d7369b47d76
1 parent
209f61bb
1 路径工具,绑定轨迹相关逻辑
Showing
10 changed files
with
380 additions
and
46 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/CollRunningFinishFragmetPresenter.java
| ... | ... | @@ -84,6 +84,11 @@ public class CollRunningFinishFragmetPresenter extends MvpBasePresenter<CollRunn |
| 84 | 84 | if (!TextUtils.isEmpty(userStepEntity.getStepCount())) { |
| 85 | 85 | double mileage = CollStepUtil.getWalkDistanceKM(Long.parseLong(userStepEntity.getStepCount())); |
| 86 | 86 | paramsMap.put("mileage", mileage + ""); |
| 87 | + if (0==mileage){ | |
| 88 | + paramsMap.put("mileage", "0"); | |
| 89 | + } | |
| 90 | + }else { | |
| 91 | + paramsMap.put("mileage", "0"); | |
| 87 | 92 | } |
| 88 | 93 | //开始时间 |
| 89 | 94 | if (0 != userStepEntity.getStartTimeStamp()) { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/RaceNameListPresenter.java
| ... | ... | @@ -12,6 +12,7 @@ import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 12 | 12 | import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; |
| 13 | 13 | import com.cnlive.moudle.pedometer.net.SubscriptionRequest; |
| 14 | 14 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 15 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | |
| 15 | 16 | import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; |
| 16 | 17 | |
| 17 | 18 | import java.util.HashMap; |
| ... | ... | @@ -25,11 +26,11 @@ import io.reactivex.disposables.Disposable; |
| 25 | 26 | public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 26 | 27 | |
| 27 | 28 | |
| 28 | - public void setData(Context context,String eventId, int pageNo, int pageSize){ | |
| 29 | + public void setData(Context context, String eventId, int pageNo, int pageSize) { | |
| 29 | 30 | HashMap<String, String> map = new HashMap<>(); |
| 30 | 31 | map.put("eventId", eventId); |
| 31 | - map.put("pageNo", pageNo+""); | |
| 32 | - map.put("pageSize", pageSize+""); | |
| 32 | + map.put("pageNo", pageNo + ""); | |
| 33 | + map.put("pageSize", pageSize + ""); | |
| 33 | 34 | getView().showLoading(); |
| 34 | 35 | Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceNameListInfo>>() { |
| 35 | 36 | @Override |
| ... | ... | @@ -47,7 +48,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 47 | 48 | }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceNameListInfo>>() { |
| 48 | 49 | @Override |
| 49 | 50 | public void onSuccess(BaseInfo<RaceNameListInfo> registerInfo) { |
| 50 | - if (getView() != null){ | |
| 51 | + if (getView() != null) { | |
| 51 | 52 | getView().onSuccess(registerInfo); |
| 52 | 53 | } |
| 53 | 54 | } |
| ... | ... | @@ -56,13 +57,14 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 56 | 57 | |
| 57 | 58 | /** |
| 58 | 59 | * 轨迹删除 |
| 60 | + * | |
| 59 | 61 | * @param context |
| 60 | - * @param id 轨迹id | |
| 62 | + * @param id 轨迹id | |
| 61 | 63 | */ |
| 62 | - public void delectShoeLine(Context context,int id,int position){ | |
| 63 | - Map<String,String> map = new HashMap<>(); | |
| 64 | - map.put("id",id+""); | |
| 65 | - Logic.create(map).action(new Logic.Action<Map<String,String>, BaseInfo>() { | |
| 64 | + public void delectShoeLine(Context context, int id, int position) { | |
| 65 | + Map<String, String> map = new HashMap<>(); | |
| 66 | + map.put("id", id + ""); | |
| 67 | + Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo>() { | |
| 66 | 68 | @Override |
| 67 | 69 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo> dataCallback) { |
| 68 | 70 | return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.deleteShoeLineInfo(stringStringMap)).subscribe(context, dataCallback); |
| ... | ... | @@ -78,7 +80,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 78 | 80 | }).setSuccessCallback(new SuccessCallback<BaseInfo>() { |
| 79 | 81 | @Override |
| 80 | 82 | public void onSuccess(BaseInfo baseInfo) { |
| 81 | - if (getView() != null){ | |
| 83 | + if (getView() != null) { | |
| 82 | 84 | getView().delectShoeLine(position); |
| 83 | 85 | } |
| 84 | 86 | } |
| ... | ... | @@ -86,16 +88,21 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 86 | 88 | } |
| 87 | 89 | |
| 88 | 90 | /** |
| 89 | - *踩点轨迹与赛事绑定 | |
| 91 | + * 踩点轨迹与赛事绑定 | |
| 92 | + * | |
| 90 | 93 | * @param context |
| 91 | - * @param id 轨迹id | |
| 94 | + * @param id 轨迹id | |
| 92 | 95 | * @param eventId 赛事id |
| 93 | 96 | */ |
| 94 | - public void bindingShoeLine(Context context,int id,String eventId,int position){ | |
| 95 | - Map<String,String> map = new HashMap<>(); | |
| 96 | - map.put("id",id+""); | |
| 97 | - map.put("eventId",eventId); | |
| 98 | - Logic.create(map).action(new Logic.Action<Map<String,String>, BaseInfo<BindingShoeInfo>>() { | |
| 97 | + public void bindingShoeLine(Context context, int id, String eventId, String fenceId, String fenceName, int position) { | |
| 98 | + QMUITipDialogUtil.loadingDialog(context, "正在绑定轨迹...", false); | |
| 99 | + Map<String, String> map = new HashMap<>(); | |
| 100 | + map.put("id", id + ""); | |
| 101 | + map.put("eventId", eventId); | |
| 102 | + map.put("fenceId", fenceId); | |
| 103 | + map.put("fenceName", fenceName); | |
| 104 | + | |
| 105 | + Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<BindingShoeInfo>>() { | |
| 99 | 106 | @Override |
| 100 | 107 | public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<BindingShoeInfo>> dataCallback) { |
| 101 | 108 | return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.bindingShoeLineInfo(stringStringMap)).subscribe(context, dataCallback); |
| ... | ... | @@ -104,6 +111,7 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 104 | 111 | @Override |
| 105 | 112 | public void onFailure(int code, String message) { |
| 106 | 113 | if (getView() != null) { |
| 114 | + QMUITipDialogUtil.dismessDialog(); | |
| 107 | 115 | getView().showToast(message); |
| 108 | 116 | getView().hideLoading(); |
| 109 | 117 | } |
| ... | ... | @@ -111,8 +119,9 @@ public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { |
| 111 | 119 | }).setSuccessCallback(new SuccessCallback<BaseInfo<BindingShoeInfo>>() { |
| 112 | 120 | @Override |
| 113 | 121 | public void onSuccess(BaseInfo<BindingShoeInfo> baseInfo) { |
| 114 | - if (getView() != null){ | |
| 115 | - getView().bindingShoeLine(position,baseInfo); | |
| 122 | + if (getView() != null) { | |
| 123 | + QMUITipDialogUtil.dismessDialog(); | |
| 124 | + getView().bindingShoeLine(position, baseInfo); | |
| 116 | 125 | } |
| 117 | 126 | } |
| 118 | 127 | }).start(); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunRaceDetailFragmentView.java
| ... | ... | @@ -41,12 +41,16 @@ import com.baidu.mapapi.search.route.RoutePlanSearch; |
| 41 | 41 | import com.baidu.mapapi.search.route.TransitRouteResult; |
| 42 | 42 | import com.baidu.mapapi.search.route.WalkingRoutePlanOption; |
| 43 | 43 | import com.baidu.mapapi.search.route.WalkingRouteResult; |
| 44 | +import com.baidu.trace.LBSTraceClient; | |
| 45 | +import com.baidu.trace.model.SortType; | |
| 46 | +import com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity; | |
| 44 | 47 | import com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity; |
| 45 | 48 | import com.cnlive.moudle.collectionTrace.ui.fragment.CollRunRaceDetailFragment; |
| 46 | 49 | import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo; |
| 47 | 50 | import com.cnlive.moudle.pedometer.model.Constant; |
| 48 | 51 | import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo; |
| 49 | 52 | import com.cnlive.moudle.pedometer.utils.BitmapUtil; |
| 53 | +import com.cnlive.moudle.pedometer.utils.MyMapUtil; | |
| 50 | 54 | import com.cnlive.moudle.pedometer.utils.ScreenUtil; |
| 51 | 55 | import com.cnlive.moudle.pedometer.utils.TimeUtil; |
| 52 | 56 | import com.cnlive.strike.application.GlideApp; |
| ... | ... | @@ -94,6 +98,7 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 94 | 98 | private LatLng startLatLng = new LatLng(39.934733, 116.308646);//起始点 |
| 95 | 99 | private List<LatLng> trackPoints; |
| 96 | 100 | public RunRaceDetailInfo runRaceDetailInfo; |
| 101 | + private LBSTraceClient mClient = null; | |
| 97 | 102 | |
| 98 | 103 | public CollRunRaceDetailFragmentView(CollRunRaceDetailFragment fragment) { |
| 99 | 104 | this.fragment = fragment; |
| ... | ... | @@ -108,6 +113,9 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 108 | 113 | if (fragment.getActivity() == null) { |
| 109 | 114 | return; |
| 110 | 115 | } |
| 116 | + if (null == mClient) { | |
| 117 | + mClient = new LBSTraceClient(getContext()); | |
| 118 | + } | |
| 111 | 119 | CollCommonInfo.setUserId(getContext(), uid); |
| 112 | 120 | this.runRaceDetailInfo = runRaceDetailInfo; |
| 113 | 121 | //显示地图 |
| ... | ... | @@ -128,6 +136,20 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 128 | 136 | } |
| 129 | 137 | }); |
| 130 | 138 | /*************************设置相关页面数据***************************/ |
| 139 | + //获取轨迹开始时间 | |
| 140 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getStartTime()) && !TextUtils.isEmpty(runRaceDetailInfo.getEndTime()) && !TextUtils.isEmpty(runRaceDetailInfo.getEntityName())) { | |
| 141 | + long startTime = Long.parseLong(runRaceDetailInfo.getStartTime()); | |
| 142 | + long endTime = Long.parseLong(runRaceDetailInfo.getEndTime()); | |
| 143 | + String entityName = runRaceDetailInfo.getEntityName(); | |
| 144 | + MyMapUtil.queryHistoryTrace(getContext(), mClient, entityName, startTime, endTime, new MyMapUtil.CallBack() { | |
| 145 | + @Override | |
| 146 | + public void success(List<LatLng> resultPoints) { | |
| 147 | + if (null != resultPoints) { | |
| 148 | + MyMapUtil.drawHistoryTrack(getContext(), baiduMap, resultPoints, SortType.asc, R.color.green_round, R.drawable.icon_start, R.drawable.icon_end); | |
| 149 | + } | |
| 150 | + } | |
| 151 | + }); | |
| 152 | + } | |
| 131 | 153 | //设置标题 |
| 132 | 154 | if (!TextUtils.isEmpty(runRaceDetailInfo.getTitle())) { |
| 133 | 155 | fragment.binding.includeStreet.tvRaceTitle.setText(runRaceDetailInfo.getTitle()); |
| ... | ... | @@ -222,7 +244,9 @@ public class CollRunRaceDetailFragmentView implements MvpView, SensorEventListen |
| 222 | 244 | @Override |
| 223 | 245 | public void onClick(View view) { |
| 224 | 246 | if (null != runRaceDetailInfo) { |
| 225 | - StartCollectTraceActivity.startActivity(fragment.getActivity(), runRaceDetailInfo); | |
| 247 | + RaceNameListActivity.newInstance(fragment.getActivity(), CollCommonInfo.getStreetId(fragment.getActivity()),runRaceDetailInfo); | |
| 248 | + | |
| 249 | +// StartCollectTraceActivity.startActivity(fragment.getActivity(), runRaceDetailInfo); | |
| 226 | 250 | } |
| 227 | 251 | } |
| 228 | 252 | }); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/CollRunningMapFragmentView.java
| 1 | 1 | package com.cnlive.moudle.collectionTrace.frame.view; |
| 2 | 2 | |
| 3 | 3 | import android.content.Context; |
| 4 | +import android.content.Intent; | |
| 4 | 5 | import android.graphics.Bitmap; |
| 5 | 6 | import android.graphics.BitmapFactory; |
| 6 | 7 | import android.hardware.Sensor; |
| ... | ... | @@ -38,8 +39,10 @@ import com.cnlive.moudle.collectionTrace.service.CollStepService; |
| 38 | 39 | import com.cnlive.moudle.collectionTrace.ui.activity.CollRunningFinishActivity; |
| 39 | 40 | import com.cnlive.moudle.collectionTrace.ui.fragment.CollRunningMapFragment; |
| 40 | 41 | import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo; |
| 42 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | |
| 41 | 43 | import com.cnlive.moudle.pedometer.model.Constant; |
| 42 | 44 | import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo; |
| 45 | +import com.cnlive.moudle.pedometer.service.StepService; | |
| 43 | 46 | import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity; |
| 44 | 47 | import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; |
| 45 | 48 | import com.cnlive.moudle.pedometer.utils.BitmapUtil; |
| ... | ... | @@ -363,6 +366,7 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener |
| 363 | 366 | if (null == currentImportLatLng || TextUtils.isEmpty(currentAddress)) { |
| 364 | 367 | return; |
| 365 | 368 | } |
| 369 | + stopStepService(); | |
| 366 | 370 | //保存用户完成时间 |
| 367 | 371 | CollStepUtil.setCollUserFinishTimeStamp(getContext(), CollCommonInfo.getUserId(getContext()), TimeUtil.getNowTimeStamp()); |
| 368 | 372 | //设置终点信息 |
| ... | ... | @@ -386,6 +390,17 @@ public class CollRunningMapFragmentView implements MvpView, SensorEventListener |
| 386 | 390 | } |
| 387 | 391 | } |
| 388 | 392 | |
| 393 | + private void stopStepService() { | |
| 394 | + CollCommonInfo.setTsRunBaiduTraceService(getContext(), false); | |
| 395 | + CollCommonInfo.setIsRunKeepAliveService(getContext(), false); | |
| 396 | + CollCommonInfo.setIsWriteUserStep(getContext(), false); | |
| 397 | + CollCommonInfo.setIsFirstStepSendTraceTip(getContext(), true); | |
| 398 | + if (CollStepService.mClient != null) { | |
| 399 | + CollStepService.mClient.stopGather(StepService.traceListener); | |
| 400 | + } | |
| 401 | + fragment.getActivity().stopService(new Intent(fragment.getActivity(), CollStepService.class)); | |
| 402 | + } | |
| 403 | + | |
| 389 | 404 | private void initChrom() { |
| 390 | 405 | //设置计时监听 |
| 391 | 406 | fragment.binding.chronometer.setOnChronometerTickListener(new Chronometer.OnChronometerTickListener() { | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceNameListView.java
| 1 | 1 | package com.cnlive.moudle.collectionTrace.frame.view; |
| 2 | 2 | |
| 3 | +import android.os.Handler; | |
| 3 | 4 | import android.support.v7.widget.LinearLayoutManager; |
| 5 | +import android.text.TextUtils; | |
| 4 | 6 | import android.util.Log; |
| 5 | 7 | import android.view.View; |
| 6 | 8 | |
| 7 | 9 | import com.baidu.trace.LBSTraceClient; |
| 8 | 10 | import com.baidu.trace.api.fence.AddMonitoredPersonResponse; |
| 11 | +import com.baidu.trace.api.fence.CreateFenceRequest; | |
| 9 | 12 | import com.baidu.trace.api.fence.CreateFenceResponse; |
| 13 | +import com.baidu.trace.api.fence.DeleteFenceRequest; | |
| 10 | 14 | import com.baidu.trace.api.fence.DeleteFenceResponse; |
| 11 | 15 | import com.baidu.trace.api.fence.DeleteMonitoredPersonResponse; |
| 16 | +import com.baidu.trace.api.fence.FenceInfo; | |
| 12 | 17 | import com.baidu.trace.api.fence.FenceListRequest; |
| 13 | 18 | import com.baidu.trace.api.fence.FenceListResponse; |
| 19 | +import com.baidu.trace.api.fence.FenceShape; | |
| 14 | 20 | import com.baidu.trace.api.fence.HistoryAlarmResponse; |
| 15 | 21 | import com.baidu.trace.api.fence.ListMonitoredPersonResponse; |
| 16 | 22 | import com.baidu.trace.api.fence.MonitoredStatusByLocationResponse; |
| 17 | 23 | import com.baidu.trace.api.fence.MonitoredStatusResponse; |
| 18 | 24 | import com.baidu.trace.api.fence.OnFenceListener; |
| 25 | +import com.baidu.trace.api.fence.PolylineFence; | |
| 19 | 26 | import com.baidu.trace.api.fence.UpdateFenceResponse; |
| 20 | 27 | import com.baidu.trace.model.CoordType; |
| 28 | +import com.baidu.trace.model.LatLng; | |
| 21 | 29 | import com.cnlive.libs.base.util.AlertUtil; |
| 22 | 30 | import com.cnlive.moudle.collectionTrace.commonInfo.CollCommonInfo; |
| 23 | 31 | import com.cnlive.moudle.collectionTrace.model.BindingShoeInfo; |
| 32 | +import com.cnlive.moudle.collectionTrace.model.CollectPoint; | |
| 24 | 33 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 25 | 34 | import com.cnlive.moudle.collectionTrace.ui.activity.CollTraceListDetailActivity; |
| 26 | 35 | import com.cnlive.moudle.collectionTrace.ui.activity.StartCollectTraceActivity; |
| ... | ... | @@ -31,6 +40,8 @@ import com.cnlive.moudle.pedometer.model.Constant; |
| 31 | 40 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 32 | 41 | import com.cnlive.moudle.pedometer.net.bean.RunRaceDetailInfo; |
| 33 | 42 | import com.cnlive.moudle.pedometer.ui.widget.SelectDialog; |
| 43 | +import com.cnlive.moudle.pedometer.utils.GsonUtil; | |
| 44 | +import com.cnlive.moudle.pedometer.utils.QMUITipDialogUtil; | |
| 34 | 45 | import com.example.moudle_pedometer.R; |
| 35 | 46 | import com.hannesdorfmann.mosby3.mvp.MvpView; |
| 36 | 47 | import com.qmuiteam.qmui.widget.dialog.QMUITipDialog; |
| ... | ... | @@ -50,6 +61,9 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 50 | 61 | List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); |
| 51 | 62 | private RaceNameListAdapter adapter; |
| 52 | 63 | private LBSTraceClient mClient = null; |
| 64 | + private List<LatLng> importPoints; | |
| 65 | + private RaceNameListInfo.EventShoeLinesBean currentSelBean; | |
| 66 | + private int currentSelPos = -1; | |
| 53 | 67 | |
| 54 | 68 | public RaceNameListView(RaceNameListFragment fragment) { |
| 55 | 69 | this.fragment = fragment; |
| ... | ... | @@ -82,8 +96,10 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 82 | 96 | } |
| 83 | 97 | |
| 84 | 98 | |
| 85 | - public void bindingShoeLine(int position,BaseInfo<BindingShoeInfo> baseInfo) { | |
| 86 | - if(baseInfo.getData().getEntityName() != null) fragment.entityName = baseInfo.getData().getEntityName(); | |
| 99 | + public void bindingShoeLine(int position, BaseInfo<BindingShoeInfo> baseInfo) { | |
| 100 | + if (baseInfo.getData().getEntityName() != null) { | |
| 101 | + fragment.entityName = baseInfo.getData().getEntityName(); | |
| 102 | + } | |
| 87 | 103 | list.get(position).setIsEnable(0); |
| 88 | 104 | for (int i = 0; i < list.size(); i++) { |
| 89 | 105 | if (i != position && list.get(i).getIsEnable() == 0) { |
| ... | ... | @@ -107,7 +123,8 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 107 | 123 | if (adapter == null) { |
| 108 | 124 | adapter = new RaceNameListAdapter(list, fragment.getActivity()); |
| 109 | 125 | fragment.binding.raceRecy.setAdapter(adapter); |
| 110 | - if(raceNameListInfoBaseInfo.getData().getEntityName() != null) fragment.entityName = raceNameListInfoBaseInfo.getData().getEntityName(); | |
| 126 | + if (raceNameListInfoBaseInfo.getData().getEntityName() != null) | |
| 127 | + fragment.entityName = raceNameListInfoBaseInfo.getData().getEntityName(); | |
| 111 | 128 | adapter.setOnItemClick(new RaceNameListAdapter.OnItemClick() { |
| 112 | 129 | @Override |
| 113 | 130 | public void onItemClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { |
| ... | ... | @@ -117,7 +134,24 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 117 | 134 | adapter.setOnAddShoeLineClick(new RaceNameListAdapter.OnAddShoeLineClick() { |
| 118 | 135 | @Override |
| 119 | 136 | public void onAddSholeLineClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { |
| 120 | - if (list.get(position).getIsEnable() == 0) return; | |
| 137 | + if (list.get(position).getIsEnable() == 0) { | |
| 138 | + return; | |
| 139 | + } | |
| 140 | + importPoints = null; | |
| 141 | + currentSelBean = eventShoeLinesBean; | |
| 142 | + currentSelPos = position; | |
| 143 | + //设置打的重要点 | |
| 144 | + if (!TextUtils.isEmpty(eventShoeLinesBean.getLatLongitude())) { | |
| 145 | + List<CollectPoint> collectPoints = GsonUtil.jsonToList(eventShoeLinesBean.getLatLongitude(), CollectPoint.class); | |
| 146 | + if (null != collectPoints) { | |
| 147 | + importPoints = new ArrayList<>(); | |
| 148 | + for (CollectPoint collectPoint : collectPoints) { | |
| 149 | + LatLng latLng = new LatLng(collectPoint.getLatitude(), collectPoint.getLongitude()); | |
| 150 | + importPoints.add(latLng); | |
| 151 | + } | |
| 152 | + } | |
| 153 | + } | |
| 154 | + | |
| 121 | 155 | SelectDialog selectDialog = new SelectDialog(fragment.getActivity(), "确定绑定该轨迹?", "否", new SelectDialog.DialogInterface() { |
| 122 | 156 | @Override |
| 123 | 157 | public void onClick(SelectDialog dialog) { |
| ... | ... | @@ -127,8 +161,21 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 127 | 161 | @Override |
| 128 | 162 | public void onClick(SelectDialog dialog) { |
| 129 | 163 | dialog.cancel(); |
| 130 | - //查询当前赛事对应的轨迹列表 | |
| 131 | - queryFenceList(eventShoeLinesBean.getEventId()); | |
| 164 | + //先判断当前是否已经绑定轨迹 | |
| 165 | + if (TextUtils.isEmpty(fragment.entityName)) { | |
| 166 | + Log.e(TAG, "onClick: 未绑定轨迹"); | |
| 167 | + //开始绑定轨迹 | |
| 168 | + //判断是否有打的点 | |
| 169 | + if (null != importPoints && !TextUtils.isEmpty(eventShoeLinesBean.getDarenId()) && !TextUtils.isEmpty(eventShoeLinesBean.getEventName())) { | |
| 170 | + addFence(eventShoeLinesBean.getDarenId(), eventShoeLinesBean.getEventName(), importPoints); | |
| 171 | + } | |
| 172 | + } else { | |
| 173 | + Log.e(TAG, "onClick: 已绑定轨迹"); | |
| 174 | + //开始查询 | |
| 175 | + queryFenceList(fragment.entityName); | |
| 176 | + } | |
| 177 | + | |
| 178 | +// queryFenceList(eventShoeLinesBean.getEventId()); | |
| 132 | 179 | // fragment.addShoeLine(eventShoeLinesBean, position); |
| 133 | 180 | } |
| 134 | 181 | }); |
| ... | ... | @@ -184,6 +231,25 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 184 | 231 | fragment.binding.refreshLayout.finishLoadMore(); |
| 185 | 232 | } |
| 186 | 233 | |
| 234 | + private void addFence(String entityName, String fenceName, List<LatLng> latLngs) { | |
| 235 | + if (null == fragment.getActivity()) { | |
| 236 | + return; | |
| 237 | + } | |
| 238 | + QMUITipDialogUtil.loadingDialog(fragment.getActivity(), "正在创建地理围栏", false); | |
| 239 | + int offset = Constant.FENCE_OFFSET;// 偏离距离 | |
| 240 | + int denoise = Constant.FENCE_DENOISE; //围栏去噪精度 | |
| 241 | + if (mClient != null && !TextUtils.isEmpty(entityName)) { | |
| 242 | + new Handler().postDelayed(new Runnable() { | |
| 243 | + @Override | |
| 244 | + public void run() { | |
| 245 | + CreateFenceRequest createFenceRequest = null; | |
| 246 | + createFenceRequest = CreateFenceRequest.buildServerPolylineRequest(Constant.TAG, Constant.SERVICE_ID, fenceName, entityName, latLngs, offset, denoise, CoordType.gcj02); | |
| 247 | + mClient.createFence(createFenceRequest, RaceNameListView.this); | |
| 248 | + } | |
| 249 | + }, 1000); | |
| 250 | + } | |
| 251 | + } | |
| 252 | + | |
| 187 | 253 | public void showErr(String msg) { |
| 188 | 254 | fragment.binding.refreshLayout.finishRefresh(); |
| 189 | 255 | fragment.binding.refreshLayout.finishLoadMore(); |
| ... | ... | @@ -220,19 +286,26 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 220 | 286 | |
| 221 | 287 | |
| 222 | 288 | public void showLoading() { |
| 223 | - if (loadingDiaog != null) loadingDiaog.show(); | |
| 289 | + if (loadingDiaog != null) { | |
| 290 | + loadingDiaog.show(); | |
| 291 | + } | |
| 224 | 292 | } |
| 225 | 293 | |
| 226 | 294 | public void hideLoading() { |
| 227 | - if (loadingDiaog != null) loadingDiaog.dismiss(); | |
| 295 | + if (loadingDiaog != null) { | |
| 296 | + loadingDiaog.dismiss(); | |
| 297 | + } | |
| 228 | 298 | } |
| 229 | 299 | |
| 230 | 300 | |
| 231 | 301 | /** |
| 232 | 302 | * 查询地理围栏 |
| 233 | 303 | */ |
| 234 | - private void queryFenceList(String eventId) { | |
| 235 | - FenceListRequest fenceListRequest = FenceListRequest.buildServerRequest(Constant.TAG, Constant.SERVICE_ID, eventId, null, CoordType.gcj02, 1, 5000); | |
| 304 | + private void queryFenceList(String entityName) { | |
| 305 | + QMUITipDialogUtil.loadingDialog(fragment.getActivity(), "正在查询围栏信息...", false); | |
| 306 | + List<Long> fenceId = new ArrayList<>(); | |
| 307 | + fenceId.add(0L); | |
| 308 | + FenceListRequest fenceListRequest = FenceListRequest.buildServerRequest(Constant.TAG, Constant.SERVICE_ID, entityName, null, CoordType.gcj02, 1, 5000); | |
| 236 | 309 | if (null != mClient || null != fenceListRequest) { |
| 237 | 310 | mClient.queryFenceList(fenceListRequest, RaceNameListView.this); |
| 238 | 311 | } |
| ... | ... | @@ -240,7 +313,23 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 240 | 313 | |
| 241 | 314 | @Override |
| 242 | 315 | public void onCreateFenceCallback(CreateFenceResponse createFenceResponse) { |
| 243 | - | |
| 316 | + //创建围栏成功 | |
| 317 | + if (null == createFenceResponse) { | |
| 318 | + QMUITipDialogUtil.dismessDialog(); | |
| 319 | + return; | |
| 320 | + } | |
| 321 | + Log.e(TAG, "onCreateFenceCallback: " + createFenceResponse.getMessage() + "状态:" + createFenceResponse.getStatus()); | |
| 322 | + Log.e(TAG, "创建的围栏ID: " + createFenceResponse.getFenceId() + "围栏名称:" + createFenceResponse.getFenceName()); | |
| 323 | + //围栏创建失败 | |
| 324 | + if (5102 == createFenceResponse.getStatus()) { | |
| 325 | + QMUITipDialogUtil.dismessDialog(); | |
| 326 | + QMUITipDialogUtil.failedDialog(fragment.getActivity(), createFenceResponse.getMessage(), 1); | |
| 327 | + } else { | |
| 328 | + if (null != currentSelBean && -1 != currentSelPos) { | |
| 329 | + QMUITipDialogUtil.dismessDialog(); | |
| 330 | + fragment.addShoeLine(currentSelBean, createFenceResponse.getFenceId() + "", currentSelPos); | |
| 331 | + } | |
| 332 | + } | |
| 244 | 333 | } |
| 245 | 334 | |
| 246 | 335 | @Override |
| ... | ... | @@ -250,7 +339,18 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 250 | 339 | |
| 251 | 340 | @Override |
| 252 | 341 | public void onDeleteFenceCallback(DeleteFenceResponse deleteFenceResponse) { |
| 253 | - | |
| 342 | + //删除围栏 | |
| 343 | + if (null == deleteFenceResponse) { | |
| 344 | + return; | |
| 345 | + } | |
| 346 | + Log.e(TAG, "onDeleteFenceCallback: " + deleteFenceResponse.getMessage() + ",状态:" + deleteFenceResponse.getStatus()); | |
| 347 | + //删除成功 | |
| 348 | + if (0 == deleteFenceResponse.getStatus()) { | |
| 349 | + QMUITipDialogUtil.dismessDialog(); | |
| 350 | + addFence(currentSelBean.getDarenId(), currentSelBean.getEventName(), importPoints); | |
| 351 | + } else { | |
| 352 | + QMUITipDialogUtil.dismessDialog(); | |
| 353 | + } | |
| 254 | 354 | } |
| 255 | 355 | |
| 256 | 356 | /** |
| ... | ... | @@ -264,7 +364,49 @@ public class RaceNameListView implements MvpView, OnFenceListener { |
| 264 | 364 | return; |
| 265 | 365 | } |
| 266 | 366 | Log.e(TAG, "onFenceListCallback:围栏数量 " + fenceListResponse.getFenceInfos().size() + ",fenceListResponse:" + fenceListResponse.getTotalSize()); |
| 367 | + List<Long> fenceIdList = null; | |
| 368 | + if (null != fenceListResponse.getFenceInfos()) { | |
| 369 | + fenceIdList = new ArrayList<>(); | |
| 370 | + for (FenceInfo fenceInfo : fenceListResponse.getFenceInfos()) { | |
| 371 | + //如果是线性围栏 | |
| 372 | + if (fenceInfo.getFenceShape() == FenceShape.polyline) { | |
| 373 | + //判断是否是当前围栏名称 | |
| 374 | + if (null != currentSelBean) { | |
| 375 | + if (!TextUtils.isEmpty(currentSelBean.getEventName())) { | |
| 376 | + String serverFenceName = fenceInfo.getPolylineFence().getFenceName(); | |
| 377 | + String currentFenceName = currentSelBean.getEventName(); | |
| 378 | + if (serverFenceName.equals(currentFenceName)) { | |
| 379 | + //添加围栏id | |
| 380 | + fenceIdList.add(fenceInfo.getPolylineFence().getFenceId()); | |
| 381 | + } | |
| 382 | + } | |
| 383 | + } | |
| 267 | 384 | |
| 385 | + } | |
| 386 | + } | |
| 387 | + //判断围栏是否查询到 | |
| 388 | + if (null != fenceIdList && fenceIdList.size() > 0) { | |
| 389 | + Log.e(TAG, "onFenceListCallback: 获取到围栏数量" + fenceIdList.size()); | |
| 390 | + List<Long> finalFenceIdList = fenceIdList; | |
| 391 | + new Handler().postDelayed(new Runnable() { | |
| 392 | + @Override | |
| 393 | + public void run() { | |
| 394 | + QMUITipDialogUtil.dismessDialog(); | |
| 395 | + //开始删除围栏 | |
| 396 | + DeleteFenceRequest deleteFenceRequest = DeleteFenceRequest.buildServerRequest(Constant.TAG, Constant.SERVICE_ID, fragment.entityName, finalFenceIdList); | |
| 397 | + if (null != mClient) { | |
| 398 | + QMUITipDialogUtil.loadingDialog(fragment.getActivity(), "正在删除围栏", false); | |
| 399 | + mClient.deleteFence(deleteFenceRequest, RaceNameListView.this); | |
| 400 | + } | |
| 401 | + } | |
| 402 | + }, 1000); | |
| 403 | + } else { | |
| 404 | + //没有查询到围栏,直接添加 | |
| 405 | + addFence(currentSelBean.getDarenId(), currentSelBean.getEventName(), importPoints); | |
| 406 | + } | |
| 407 | + } else { | |
| 408 | + QMUITipDialogUtil.dismessDialog(); | |
| 409 | + } | |
| 268 | 410 | } |
| 269 | 411 | |
| 270 | 412 | @Override | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/StartTraceFragmentView.java
| ... | ... | @@ -210,21 +210,25 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | private void checkBaiduServiceState() { |
| 213 | - boolean isRunBaidu = CollCommonInfo.getIsRunBaiduTraceService(getContext()); | |
| 214 | - //要运行百度 | |
| 215 | - if (isRunBaidu) { | |
| 213 | + | |
| 214 | +// boolean isRunBaidu = CollCommonInfo.getIsRunBaiduTraceService(getContext()); | |
| 215 | +// //要运行百度 | |
| 216 | +// if (isRunBaidu) { | |
| 216 | 217 | //判断百度服务是否运行 |
| 217 | - if (!ServiceUtils.isServiceRunning(getContext(), "com.baidu.trace.LBSTraceService")) { | |
| 218 | + boolean isBaiduRun = ServiceUtils.isServiceRunning(getContext(), "com.baidu.trace.LBSTraceService"); | |
| 219 | + boolean isKeepRun = ServiceUtils.isServiceRunning(getContext(), "com.cnlive.moudle.collectionTrace.service.CollKeepLiveService"); | |
| 220 | + boolean isStepRun = ServiceUtils.isServiceRunning(getContext(), "com.cnlive.moudle.collectionTrace.service.CollStepService"); | |
| 221 | + if (!isBaiduRun || !isKeepRun || !isStepRun) { | |
| 218 | 222 | stopStepService(); |
| 219 | 223 | startStepService(getContext()); |
| 220 | 224 | } else { |
| 221 | 225 | CollRunningMapActivity.startActivity(fragment.getActivity(), runRaceDetailInfo); |
| 222 | 226 | fragment.getActivity().finish(); |
| 223 | 227 | } |
| 224 | - } else { | |
| 225 | - CollRunningMapActivity.startActivity(fragment.getActivity(), runRaceDetailInfo); | |
| 226 | - fragment.getActivity().finish(); | |
| 227 | - } | |
| 228 | +// } else { | |
| 229 | +// CollRunningMapActivity.startActivity(fragment.getActivity(), runRaceDetailInfo); | |
| 230 | +// fragment.getActivity().finish(); | |
| 231 | +// } | |
| 228 | 232 | } |
| 229 | 233 | |
| 230 | 234 | private void stopStepService() { |
| ... | ... | @@ -232,10 +236,13 @@ public class StartTraceFragmentView implements MvpView, SensorEventListener { |
| 232 | 236 | CollCommonInfo.setIsRunKeepAliveService(getContext(), false); |
| 233 | 237 | CollCommonInfo.setIsWriteUserStep(getContext(), false); |
| 234 | 238 | CollCommonInfo.setIsFirstStepSendTraceTip(getContext(), true); |
| 239 | + | |
| 235 | 240 | if (CollStepService.mClient != null) { |
| 236 | 241 | CollStepService.mClient.stopGather(CollStepService.traceListener); |
| 237 | 242 | } |
| 238 | 243 | fragment.getActivity().stopService(new Intent(fragment.getActivity(), CollStepService.class)); |
| 244 | + fragment.getActivity().stopService(new Intent(fragment.getActivity(), CollKeepLiveService.class)); | |
| 245 | + | |
| 239 | 246 | } |
| 240 | 247 | |
| 241 | 248 | /** | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/CollTraceListDetailFragment.java
| ... | ... | @@ -11,13 +11,14 @@ import com.cnlive.moudle.collectionTrace.frame.view.CollTraceListDetailFragmentV |
| 11 | 11 | import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; |
| 12 | 12 | import com.example.moudle_pedometer.R; |
| 13 | 13 | import com.example.moudle_pedometer.databinding.FragmentCollFinishRunMapBinding; |
| 14 | +import com.example.moudle_pedometer.databinding.FragmentCollRaceDetailBinding; | |
| 14 | 15 | |
| 15 | 16 | /** |
| 16 | 17 | * 轨迹列表详情页 |
| 17 | 18 | * |
| 18 | 19 | * @author ShinnyYang |
| 19 | 20 | */ |
| 20 | -public class CollTraceListDetailFragment extends QMUIFragment<CollTraceListDetailFragmentView, CollTraceListDetailFragmentPresenter, FragmentCollFinishRunMapBinding> { | |
| 21 | +public class CollTraceListDetailFragment extends QMUIFragment<CollTraceListDetailFragmentView, CollTraceListDetailFragmentPresenter, FragmentCollRaceDetailBinding> { | |
| 21 | 22 | private RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean; |
| 22 | 23 | |
| 23 | 24 | public static CollTraceListDetailFragment newInstance(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean) { |
| ... | ... | @@ -40,13 +41,13 @@ public class CollTraceListDetailFragment extends QMUIFragment<CollTraceListDetai |
| 40 | 41 | |
| 41 | 42 | @Override |
| 42 | 43 | protected int getLayoutId() { |
| 43 | - return R.layout.fragment_coll_finish_run_map; | |
| 44 | + return R.layout.fragment_coll_race_detail; | |
| 44 | 45 | } |
| 45 | 46 | |
| 46 | 47 | @Override |
| 47 | 48 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { |
| 48 | 49 | super.onViewCreated(view, savedInstanceState); |
| 49 | - StatusBarUtil2.setColor(getActivity(), getResources().getColor(R.color.white), 0); | |
| 50 | + StatusBarUtil2.setColor(getActivity(), getResources().getColor(R.color.run_main_bg), 0); | |
| 50 | 51 | |
| 51 | 52 | if (null != getArguments()) { |
| 52 | 53 | eventShoeLinesBean = (RaceNameListInfo.EventShoeLinesBean) getArguments().get("eventShoeLinesBean"); | ... | ... |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/RaceNameListFragment.java
| ... | ... | @@ -69,8 +69,8 @@ public class RaceNameListFragment extends MvpBindingFragment<RaceNameListView, R |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | |
| 72 | - public void addShoeLine(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { | |
| 73 | - getPresenter().bindingShoeLine(getActivity(), eventShoeLinesBean.getId(), eventShoeLinesBean.getEventId(), position); | |
| 72 | + public void addShoeLine(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, String fenceId, int position) { | |
| 73 | + getPresenter().bindingShoeLine(getActivity(), eventShoeLinesBean.getId(), eventShoeLinesBean.getEventId(), fenceId, eventShoeLinesBean.getEventName(), position); | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public void delectShoeLine(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { | ... | ... |
moudle_pedometer/src/main/res/layout/fragment_coll_finish_run_map.xml
moudle_pedometer/src/main/res/layout/fragment_coll_race_detail.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 | + <FrameLayout | |
| 6 | + android:layout_width="match_parent" | |
| 7 | + android:layout_height="match_parent"> | |
| 8 | + | |
| 9 | + <com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto" | |
| 10 | + android:id="@+id/sliding_layout" | |
| 11 | + android:layout_width="match_parent" | |
| 12 | + android:layout_height="match_parent" | |
| 13 | + android:gravity="bottom" | |
| 14 | + sothree:umanoDragView="@+id/dragView" | |
| 15 | + sothree:umanoFadeColor="@color/black_20" | |
| 16 | + sothree:umanoOverlay="true" | |
| 17 | + sothree:umanoPanelHeight="250dp" | |
| 18 | + sothree:umanoParallaxOffset="0dp" | |
| 19 | + sothree:umanoScrollableView="@+id/rv_list" | |
| 20 | + sothree:umanoShadowHeight="0dp"> | |
| 21 | + | |
| 22 | + <!-- MAIN CONTENT --> | |
| 23 | + <FrameLayout | |
| 24 | + android:layout_width="match_parent" | |
| 25 | + android:layout_height="match_parent"> | |
| 26 | + | |
| 27 | + <com.baidu.mapapi.map.MapView | |
| 28 | + android:id="@+id/mapView" | |
| 29 | + android:layout_width="match_parent" | |
| 30 | + android:layout_height="match_parent"></com.baidu.mapapi.map.MapView> | |
| 31 | + <!--地图上面加一层类似于全透明黑色蒙版--> | |
| 32 | + <LinearLayout | |
| 33 | + android:layout_width="match_parent" | |
| 34 | + android:layout_height="match_parent" | |
| 35 | + android:background="#0D000000" | |
| 36 | + android:clickable="false" | |
| 37 | + android:focusable="false" | |
| 38 | + android:focusableInTouchMode="false"></LinearLayout> | |
| 39 | + | |
| 40 | + <FrameLayout | |
| 41 | + android:id="@+id/fl_back" | |
| 42 | + android:layout_width="55dp" | |
| 43 | + android:layout_height="55dp" | |
| 44 | + android:background="@drawable/button_fab_white" | |
| 45 | + android:focusable="true"> | |
| 46 | + | |
| 47 | + <ImageView | |
| 48 | + android:layout_width="12dp" | |
| 49 | + android:layout_height="20dp" | |
| 50 | + android:layout_gravity="center" | |
| 51 | + android:layout_marginLeft="-2dp" | |
| 52 | + android:background="@drawable/icon_back" | |
| 53 | + android:focusable="false" /> | |
| 54 | + </FrameLayout> | |
| 55 | + | |
| 56 | + <FrameLayout | |
| 57 | + android:layout_width="55dp" | |
| 58 | + android:layout_height="55dp" | |
| 59 | + android:layout_gravity="right" | |
| 60 | + android:background="@drawable/button_fab_white" | |
| 61 | + android:focusable="true" | |
| 62 | + android:visibility="gone"> | |
| 63 | + | |
| 64 | + <ImageView | |
| 65 | + android:layout_width="19dp" | |
| 66 | + android:layout_height="18dp" | |
| 67 | + android:layout_gravity="center" | |
| 68 | + android:background="@drawable/icon_share" /> | |
| 69 | + </FrameLayout> | |
| 70 | + <!----> | |
| 71 | + | |
| 72 | + | |
| 73 | + </FrameLayout> | |
| 74 | + | |
| 75 | + <!-- SLIDING LAYOUT --> | |
| 76 | + <FrameLayout | |
| 77 | + android:id="@+id/dragView" | |
| 78 | + android:layout_width="match_parent" | |
| 79 | + android:layout_height="wrap_content" | |
| 80 | + android:clickable="true" | |
| 81 | + android:focusable="false" | |
| 82 | + android:orientation="vertical"> | |
| 83 | + | |
| 84 | + | |
| 85 | + <LinearLayout | |
| 86 | + android:id="@+id/ll_root" | |
| 87 | + android:layout_width="match_parent" | |
| 88 | + android:layout_height="wrap_content" | |
| 89 | + android:layout_marginBottom="0dp" | |
| 90 | + android:orientation="vertical"> | |
| 91 | + | |
| 92 | + | |
| 93 | + <!--用户个人信息--> | |
| 94 | + <include | |
| 95 | + android:id="@+id/include_finish_user_info" | |
| 96 | + layout="@layout/layout_coll_finish_user_info" /> | |
| 97 | + </LinearLayout> | |
| 98 | + | |
| 99 | + | |
| 100 | + </FrameLayout> | |
| 101 | + </com.sothree.slidinguppanel.SlidingUpPanelLayout> | |
| 102 | + <!--按钮--> | |
| 103 | + <LinearLayout | |
| 104 | + android:id="@+id/rl_scrollView_startBtn" | |
| 105 | + android:layout_width="match_parent" | |
| 106 | + android:layout_height="40sp" | |
| 107 | + android:layout_gravity="bottom" | |
| 108 | + android:focusable="true" | |
| 109 | + android:clickable="true" | |
| 110 | + android:focusableInTouchMode="true" | |
| 111 | + android:background="@color/green_round" | |
| 112 | + android:gravity="center" | |
| 113 | + android:tag="0"> | |
| 114 | + | |
| 115 | + | |
| 116 | + <TextView | |
| 117 | + android:id="@+id/tv_run_now" | |
| 118 | + android:layout_width="wrap_content" | |
| 119 | + android:layout_height="wrap_content" | |
| 120 | + android:layout_centerInParent="true" | |
| 121 | + android:layout_marginLeft="5dp" | |
| 122 | + android:clickable="false" | |
| 123 | + android:focusable="false" | |
| 124 | + android:focusableInTouchMode="false" | |
| 125 | + android:tag="0" | |
| 126 | + android:text="确定轨迹" | |
| 127 | + android:textColor="@color/white" | |
| 128 | + android:textSize="18sp" /> | |
| 129 | + </LinearLayout> | |
| 130 | + </FrameLayout> | |
| 131 | +</layout> | |
| 0 | 132 | \ No newline at end of file | ... | ... |