Commit c18828ed5de1f7cd5ef93f153927e9d81026db4a
Merge remote-tracking branch 'origin/master'
# Conflicts: # moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/net/ApiServiceRunLin.java # moudle_pedometer/src/main/res/values/strings.xml
Showing
22 changed files
with
980 additions
and
11 deletions
app/src/main/java/com/example/modulepedometer/MainActivity.java
| @@ -5,6 +5,8 @@ import android.os.Bundle; | @@ -5,6 +5,8 @@ import android.os.Bundle; | ||
| 5 | import android.support.v7.app.AppCompatActivity; | 5 | import android.support.v7.app.AppCompatActivity; |
| 6 | 6 | ||
| 7 | import com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity; | 7 | import com.cnlive.moudle.collectionTrace.ui.activity.CollRunRaceDetailActivity; |
| 8 | +import com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity; | ||
| 9 | +import com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity; | ||
| 8 | import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity; | 10 | import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity; |
| 9 | 11 | ||
| 10 | 12 |
config.gradle
moudle_pedometer/src/main/AndroidManifest.xml
| @@ -52,7 +52,8 @@ | @@ -52,7 +52,8 @@ | ||
| 52 | android:required="true" /> | 52 | android:required="true" /> |
| 53 | 53 | ||
| 54 | <application android:persistent="true"> | 54 | <application android:persistent="true"> |
| 55 | - <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity"></activity> | 55 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity"></activity> |
| 56 | + <activity android:name="com.cnlive.moudle.collectionTrace.ui.activity.RaceListActivity" /> | ||
| 56 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity" /> | 57 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.LineUpAgainActivity" /> |
| 57 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" /> | 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.SelfRecordActivity" /> |
| 58 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" /> | 59 | <activity android:name="com.cnlive.moudle.pedometer.ui.activity.TakePartActivity" /> |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/RaceNameListPresenter.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.frame.presenter; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | + | ||
| 5 | +import com.cnlive.libs.base.logic.Logic; | ||
| 6 | +import com.cnlive.libs.base.logic.callback.DataCallback; | ||
| 7 | +import com.cnlive.libs.base.logic.callback.FailureCallback; | ||
| 8 | +import com.cnlive.libs.base.logic.callback.SuccessCallback; | ||
| 9 | +import com.cnlive.moudle.collectionTrace.frame.view.RaceNameListView; | ||
| 10 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 11 | +import com.cnlive.moudle.pedometer.net.ApiServiceRunLin; | ||
| 12 | +import com.cnlive.moudle.pedometer.net.SubscriptionRequest; | ||
| 13 | +import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | ||
| 14 | +import com.hannesdorfmann.mosby3.mvp.MvpBasePresenter; | ||
| 15 | + | ||
| 16 | +import java.util.HashMap; | ||
| 17 | +import java.util.Map; | ||
| 18 | + | ||
| 19 | +import io.reactivex.disposables.Disposable; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * Created by hanyayun 019/06/25. | ||
| 23 | + */ | ||
| 24 | +public class RaceNameListPresenter extends MvpBasePresenter<RaceNameListView> { | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + public void setData(Context context,String eventId, int pageNo, int pageSize){ | ||
| 28 | + HashMap<String, String> map = new HashMap<>(); | ||
| 29 | + map.put("eventId", eventId); | ||
| 30 | + map.put("pageNo", pageNo+""); | ||
| 31 | + map.put("pageSize", pageSize+""); | ||
| 32 | + getView().showLoading(); | ||
| 33 | + Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceNameListInfo>>() { | ||
| 34 | + @Override | ||
| 35 | + public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceNameListInfo>> dataCallback) { | ||
| 36 | + return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.getRaceNameListInfo(stringStringMap)).subscribe(context, dataCallback); | ||
| 37 | + } | ||
| 38 | + }).<BaseInfo<RaceNameListInfo>>event().setFailureCallback(new FailureCallback() { | ||
| 39 | + @Override | ||
| 40 | + public void onFailure(int code, String message) { | ||
| 41 | + if (getView() != null) { | ||
| 42 | + getView().showErr(message); | ||
| 43 | + getView().hideLoading(); | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceNameListInfo>>() { | ||
| 47 | + @Override | ||
| 48 | + public void onSuccess(BaseInfo<RaceNameListInfo> registerInfo) { | ||
| 49 | + if (getView() != null){ | ||
| 50 | + getView().onSuccess(registerInfo); | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | + }).start(); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 轨迹删除 | ||
| 58 | + * @param context | ||
| 59 | + * @param id 轨迹id | ||
| 60 | + */ | ||
| 61 | + public void delectShoeLine(Context context,int id,int position){ | ||
| 62 | + Map<String,String> map = new HashMap<>(); | ||
| 63 | + map.put("id",id+""); | ||
| 64 | + Logic.create(map).action(new Logic.Action<Map<String,String>, BaseInfo>() { | ||
| 65 | + @Override | ||
| 66 | + public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo> dataCallback) { | ||
| 67 | + return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.deleteShoeLineInfo(stringStringMap)).subscribe(context, dataCallback); | ||
| 68 | + } | ||
| 69 | + }).<BaseInfo>event().setFailureCallback(new FailureCallback() { | ||
| 70 | + @Override | ||
| 71 | + public void onFailure(int code, String message) { | ||
| 72 | + if (getView() != null) { | ||
| 73 | + getView().showToast(message); | ||
| 74 | + getView().hideLoading(); | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + }).setSuccessCallback(new SuccessCallback<BaseInfo>() { | ||
| 78 | + @Override | ||
| 79 | + public void onSuccess(BaseInfo baseInfo) { | ||
| 80 | + if (getView() != null){ | ||
| 81 | + getView().delectShoeLine(position); | ||
| 82 | + } | ||
| 83 | + } | ||
| 84 | + }).start(); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + /** | ||
| 88 | + *踩点轨迹与赛事绑定 | ||
| 89 | + * @param context | ||
| 90 | + * @param id 轨迹id | ||
| 91 | + * @param eventId 赛事id | ||
| 92 | + */ | ||
| 93 | + public void bindingShoeLine(Context context,int id,String eventId,int position){ | ||
| 94 | + Map<String,String> map = new HashMap<>(); | ||
| 95 | + map.put("id",id+""); | ||
| 96 | + map.put("eventId",eventId); | ||
| 97 | + Logic.create(map).action(new Logic.Action<Map<String,String>, BaseInfo>() { | ||
| 98 | + @Override | ||
| 99 | + public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo> dataCallback) { | ||
| 100 | + return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.bindingShoeLineInfo(stringStringMap)).subscribe(context, dataCallback); | ||
| 101 | + } | ||
| 102 | + }).<BaseInfo>event().setFailureCallback(new FailureCallback() { | ||
| 103 | + @Override | ||
| 104 | + public void onFailure(int code, String message) { | ||
| 105 | + if (getView() != null) { | ||
| 106 | + getView().showToast(message); | ||
| 107 | + getView().hideLoading(); | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + }).setSuccessCallback(new SuccessCallback<BaseInfo>() { | ||
| 111 | + @Override | ||
| 112 | + public void onSuccess(BaseInfo baseInfo) { | ||
| 113 | + if (getView() != null){ | ||
| 114 | + getView().bindingShoeLine(position); | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + }).start(); | ||
| 118 | + } | ||
| 119 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceListView.java
| 1 | package com.cnlive.moudle.collectionTrace.frame.view; | 1 | package com.cnlive.moudle.collectionTrace.frame.view; |
| 2 | 2 | ||
| 3 | +import android.support.v7.widget.LinearLayoutManager; | ||
| 3 | import android.view.View; | 4 | import android.view.View; |
| 4 | 5 | ||
| 5 | import com.cnlive.libs.base.util.AlertUtil; | 6 | import com.cnlive.libs.base.util.AlertUtil; |
| @@ -42,6 +43,7 @@ public class RaceListView implements MvpView { | @@ -42,6 +43,7 @@ public class RaceListView implements MvpView { | ||
| 42 | fragment.binding.topbar.setTitle("赛事列表"); | 43 | fragment.binding.topbar.setTitle("赛事列表"); |
| 43 | fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity())); | 44 | fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity())); |
| 44 | fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity())); | 45 | fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity())); |
| 46 | + fragment.binding.raceRecy.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); | ||
| 45 | } | 47 | } |
| 46 | 48 | ||
| 47 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ | 49 | public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){ |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceNameListView.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.frame.view; | ||
| 2 | + | ||
| 3 | +import android.support.v7.widget.LinearLayoutManager; | ||
| 4 | +import android.view.View; | ||
| 5 | + | ||
| 6 | +import com.cnlive.libs.base.util.AlertUtil; | ||
| 7 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 8 | +import com.cnlive.moudle.collectionTrace.ui.adapter.RaceNameListAdapter; | ||
| 9 | +import com.cnlive.moudle.collectionTrace.ui.fragment.RaceNameListFragment; | ||
| 10 | +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | ||
| 11 | +import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | ||
| 12 | +import com.example.moudle_pedometer.R; | ||
| 13 | +import com.hannesdorfmann.mosby3.mvp.MvpView; | ||
| 14 | +import com.qmuiteam.qmui.widget.dialog.QMUITipDialog; | ||
| 15 | +import com.scwang.smartrefresh.layout.footer.ClassicsFooter; | ||
| 16 | +import com.scwang.smartrefresh.layout.header.ClassicsHeader; | ||
| 17 | + | ||
| 18 | +import java.util.ArrayList; | ||
| 19 | +import java.util.List; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * Created by hanyayun 019/06/25. | ||
| 23 | + */ | ||
| 24 | +public class RaceNameListView implements MvpView { | ||
| 25 | + RaceNameListFragment fragment; | ||
| 26 | + public QMUITipDialog loadingDiaog; | ||
| 27 | + List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); | ||
| 28 | + private RaceNameListAdapter adapter; | ||
| 29 | + | ||
| 30 | + public RaceNameListView(RaceNameListFragment fragment) { | ||
| 31 | + this.fragment = fragment; | ||
| 32 | + loadingDiaog = new QMUITipDialog.Builder(fragment.getActivity()) | ||
| 33 | + .setIconType(QMUITipDialog.Builder.ICON_TYPE_LOADING) | ||
| 34 | + .setTipWord("请稍后") | ||
| 35 | + .create(); | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + | ||
| 39 | + public void initView(){ | ||
| 40 | + fragment.binding.raceBack.setOnClickListener(v -> fragment.getActivity().finish()); | ||
| 41 | +// fragment.binding.intoPath.setOnClickListener(v -> ); | ||
| 42 | + fragment.binding.raceTittle.setText("赛事轨迹列表"); | ||
| 43 | + fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity())); | ||
| 44 | + fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity())); | ||
| 45 | + fragment.binding.raceRecy.setLayoutManager(new LinearLayoutManager(fragment.getActivity())); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + | ||
| 49 | + public void bindingShoeLine(int position){ | ||
| 50 | + list.get(position).setIsEnable(0); | ||
| 51 | + for(int i = 0;i <list.size();i++){ | ||
| 52 | + if(i != position && list.get(i).getIsEnable() == 0){ | ||
| 53 | + list.get(i).setIsEnable(1); | ||
| 54 | + } | ||
| 55 | + } | ||
| 56 | + adapter.notifyDataSetChanged(); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + | ||
| 60 | + public void delectShoeLine(int position){ | ||
| 61 | + list.remove(position); | ||
| 62 | + adapter.notifyDataSetChanged(); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void onSuccess(BaseInfo<RaceNameListInfo> raceNameListInfoBaseInfo){ | ||
| 66 | + hideLoading(); | ||
| 67 | + if(fragment.currentPage == 1){ | ||
| 68 | + list.clear(); | ||
| 69 | + list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); | ||
| 70 | + if(adapter == null){ | ||
| 71 | + adapter = new RaceNameListAdapter(list,fragment.getActivity()); | ||
| 72 | + fragment.binding.raceRecy.setAdapter(adapter); | ||
| 73 | + adapter.setOnItemClick(new RaceNameListAdapter.OnItemClick() { | ||
| 74 | + @Override | ||
| 75 | + public void onItemClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { | ||
| 76 | + | ||
| 77 | + } | ||
| 78 | + }); | ||
| 79 | + adapter.setOnAddShoeLineClick(new RaceNameListAdapter.OnAddShoeLineClick() { | ||
| 80 | + @Override | ||
| 81 | + public void onAddSholeLineClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { | ||
| 82 | + fragment.addShoeLine(eventShoeLinesBean,position); | ||
| 83 | + } | ||
| 84 | + }); | ||
| 85 | + | ||
| 86 | + adapter.setOnDelectShoeLineClick(new RaceNameListAdapter.OnDelectShoeLineClick() { | ||
| 87 | + @Override | ||
| 88 | + public void onDelectShoeLineClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean, int position) { | ||
| 89 | + fragment.delectShoeLine(eventShoeLinesBean,position); | ||
| 90 | + } | ||
| 91 | + }); | ||
| 92 | + }else { | ||
| 93 | + adapter.notifyDataSetChanged(); | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + if(list.size() != 0){ | ||
| 98 | + fragment.binding.empty.setVisibility(View.GONE); | ||
| 99 | + fragment.binding.refreshLayout.setVisibility(View.VISIBLE); | ||
| 100 | + }else { | ||
| 101 | + showEmpty(); | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + if(raceNameListInfoBaseInfo.getData().getEventShoeLines().size() < fragment.pageSize){ | ||
| 105 | + fragment.binding.refreshLayout.setEnableLoadMore(false); | ||
| 106 | + }else { | ||
| 107 | + fragment.binding.refreshLayout.setEnableLoadMore(true); | ||
| 108 | + } | ||
| 109 | + if(fragment.currentPage > 1){ | ||
| 110 | + list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); | ||
| 111 | + adapter.notifyDataSetChanged(); | ||
| 112 | + } | ||
| 113 | + fragment.binding.refreshLayout.finishRefresh(); | ||
| 114 | + fragment.binding.refreshLayout.finishLoadMore(); | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public void showErr(String msg){ | ||
| 118 | + fragment.binding.refreshLayout.finishRefresh(); | ||
| 119 | + fragment.binding.refreshLayout.finishLoadMore(); | ||
| 120 | + if (list.size() == 0) { | ||
| 121 | + fragment.binding.empty.setVisibility(View.VISIBLE); | ||
| 122 | + fragment.binding.refreshLayout.setVisibility(View.GONE); | ||
| 123 | + fragment.binding.empty.setDetailText(fragment.getResources().getString(R.string.msg_failed_network_detail)); | ||
| 124 | + fragment.binding.empty.setTitleText(msg); | ||
| 125 | + fragment.binding.empty.setButton("重试", new View.OnClickListener() { | ||
| 126 | + @Override | ||
| 127 | + public void onClick(View v) { | ||
| 128 | + fragment.currentPage = 1; | ||
| 129 | + fragment.getPresenter().setData(fragment.getActivity(), CommonInfo.getUserId(fragment.getActivity()),fragment.currentPage,fragment.pageSize); | ||
| 130 | + } | ||
| 131 | + }); | ||
| 132 | + fragment.binding.empty.setLoadingShowing(false); | ||
| 133 | + fragment.binding.empty.setImage(R.drawable.wufalianjie); | ||
| 134 | + } else { | ||
| 135 | + fragment.binding.empty.setVisibility(View.GONE); | ||
| 136 | + fragment.binding.refreshLayout.setVisibility(View.VISIBLE); | ||
| 137 | + showToast(msg); | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public void showToast(String message) { | ||
| 142 | + AlertUtil.showDeftToast(fragment.getActivity(), message); | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public void showEmpty(){ | ||
| 146 | + fragment.binding.empty.setVisibility(View.VISIBLE); | ||
| 147 | + fragment.binding.refreshLayout.setVisibility(View.GONE); | ||
| 148 | + fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + | ||
| 152 | + public void showLoading() { | ||
| 153 | + if (loadingDiaog != null) loadingDiaog.show(); | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void hideLoading() { | ||
| 157 | + if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 158 | + } | ||
| 159 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/model/RaceNameListInfo.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.model; | ||
| 2 | + | ||
| 3 | +import java.util.List; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * Created by hanyayun 019/06/25. | ||
| 7 | + */ | ||
| 8 | +public class RaceNameListInfo { | ||
| 9 | + | ||
| 10 | + /** | ||
| 11 | + * 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}] | ||
| 12 | + * hasNext : false | ||
| 13 | + */ | ||
| 14 | + | ||
| 15 | + private boolean hasNext; | ||
| 16 | + private List<EventShoeLinesBean> eventShoeLines; | ||
| 17 | + | ||
| 18 | + public boolean isHasNext() { | ||
| 19 | + return hasNext; | ||
| 20 | + } | ||
| 21 | + | ||
| 22 | + public void setHasNext(boolean hasNext) { | ||
| 23 | + this.hasNext = hasNext; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public List<EventShoeLinesBean> getEventShoeLines() { | ||
| 27 | + return eventShoeLines; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public void setEventShoeLines(List<EventShoeLinesBean> eventShoeLines) { | ||
| 31 | + this.eventShoeLines = eventShoeLines; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public static class EventShoeLinesBean { | ||
| 35 | + /** | ||
| 36 | + * createTime : 1560498861000 | ||
| 37 | + * darenId : daren_10513196 | ||
| 38 | + * endLocation : 首都师范大学操场西门 | ||
| 39 | + * eventId : 116 | ||
| 40 | + * id : 120 | ||
| 41 | + * isEnable : 0 | ||
| 42 | + * 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}] | ||
| 43 | + * mileage : 5 | ||
| 44 | + * 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 | ||
| 45 | + * startLocation : 首都师范大学操场东门 | ||
| 46 | + * updateTime : 1560498861000 | ||
| 47 | + */ | ||
| 48 | + | ||
| 49 | + private long createTime; | ||
| 50 | + private String darenId; | ||
| 51 | + private String endLocation; | ||
| 52 | + private String eventId; | ||
| 53 | + private int id; | ||
| 54 | + private int isEnable; | ||
| 55 | + private String latLongitude; | ||
| 56 | + private String mileage; | ||
| 57 | + private String roadmap; | ||
| 58 | + private String startLocation; | ||
| 59 | + private long updateTime; | ||
| 60 | + | ||
| 61 | + public long getCreateTime() { | ||
| 62 | + return createTime; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setCreateTime(long createTime) { | ||
| 66 | + this.createTime = createTime; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public String getDarenId() { | ||
| 70 | + return darenId; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public void setDarenId(String darenId) { | ||
| 74 | + this.darenId = darenId; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public String getEndLocation() { | ||
| 78 | + return endLocation; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public void setEndLocation(String endLocation) { | ||
| 82 | + this.endLocation = endLocation; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public String getEventId() { | ||
| 86 | + return eventId; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public void setEventId(String eventId) { | ||
| 90 | + this.eventId = eventId; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public int getId() { | ||
| 94 | + return id; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public void setId(int id) { | ||
| 98 | + this.id = id; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public int getIsEnable() { | ||
| 102 | + return isEnable; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public void setIsEnable(int isEnable) { | ||
| 106 | + this.isEnable = isEnable; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public String getLatLongitude() { | ||
| 110 | + return latLongitude; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public void setLatLongitude(String latLongitude) { | ||
| 114 | + this.latLongitude = latLongitude; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public String getMileage() { | ||
| 118 | + return mileage; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public void setMileage(String mileage) { | ||
| 122 | + this.mileage = mileage; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public String getRoadmap() { | ||
| 126 | + return roadmap; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public void setRoadmap(String roadmap) { | ||
| 130 | + this.roadmap = roadmap; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public String getStartLocation() { | ||
| 134 | + return startLocation; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public void setStartLocation(String startLocation) { | ||
| 138 | + this.startLocation = startLocation; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public long getUpdateTime() { | ||
| 142 | + return updateTime; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public void setUpdateTime(long updateTime) { | ||
| 146 | + this.updateTime = updateTime; | ||
| 147 | + } | ||
| 148 | + } | ||
| 149 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/activity/RaceListActivity.java
| 1 | package com.cnlive.moudle.collectionTrace.ui.activity; | 1 | package com.cnlive.moudle.collectionTrace.ui.activity; |
| 2 | 2 | ||
| 3 | +import android.content.Context; | ||
| 4 | +import android.content.Intent; | ||
| 3 | import android.support.v7.app.AppCompatActivity; | 5 | import android.support.v7.app.AppCompatActivity; |
| 4 | import android.os.Bundle; | 6 | import android.os.Bundle; |
| 5 | 7 | ||
| @@ -15,13 +17,27 @@ import com.example.moudle_pedometer.R; | @@ -15,13 +17,27 @@ import com.example.moudle_pedometer.R; | ||
| 15 | */ | 17 | */ |
| 16 | public class RaceListActivity extends AppCompatActivity { | 18 | public class RaceListActivity extends AppCompatActivity { |
| 17 | 19 | ||
| 20 | + public static void newInstance(Context context,String userId,String userName,String userIcon){ | ||
| 21 | + Intent intent = new Intent(context,RaceListActivity.class); | ||
| 22 | + intent.putExtra("userId",userId); | ||
| 23 | + intent.putExtra("userName",userName); | ||
| 24 | + intent.putExtra("userIcon",userIcon); | ||
| 25 | + context.startActivity(intent); | ||
| 26 | + } | ||
| 27 | + | ||
| 18 | @Override | 28 | @Override |
| 19 | protected void onCreate(Bundle savedInstanceState) { | 29 | protected void onCreate(Bundle savedInstanceState) { |
| 20 | super.onCreate(savedInstanceState); | 30 | super.onCreate(savedInstanceState); |
| 21 | StatusBarUtil.setStatusBarWrite(this); | 31 | StatusBarUtil.setStatusBarWrite(this); |
| 22 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.white), 0); | 32 | StatusBarUtil2.setColor(this, getResources().getColor(R.color.white), 0); |
| 23 | setContentView(R.layout.activity_race_list); | 33 | setContentView(R.layout.activity_race_list); |
| 24 | - CommonInfo.setUserId(this, "10513196"); | 34 | + if(getIntent().getStringExtra("userId") != null){ |
| 35 | + CommonInfo.setUserId(this,getIntent().getStringExtra("userId")); | ||
| 36 | + CommonInfo.setUserNickName(this,getIntent().getStringExtra("userName")); | ||
| 37 | + CommonInfo.setUserIcon(this,getIntent().getStringExtra("userIcon")); | ||
| 38 | + }else { | ||
| 39 | + CommonInfo.setUserId(this, "10513196"); | ||
| 40 | + } | ||
| 25 | getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceListFragment()).commit(); | 41 | getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceListFragment()).commit(); |
| 26 | } | 42 | } |
| 27 | } | 43 | } |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/activity/RaceNameListActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.ui.activity; | ||
| 2 | + | ||
| 3 | +import android.content.Context; | ||
| 4 | +import android.content.Intent; | ||
| 5 | +import android.support.v7.app.AppCompatActivity; | ||
| 6 | +import android.os.Bundle; | ||
| 7 | + | ||
| 8 | +import com.cnlive.libs.base.util.StatusBarUtil; | ||
| 9 | +import com.cnlive.libs.base.util.StatusBarUtil2; | ||
| 10 | +import com.cnlive.moudle.collectionTrace.ui.fragment.RaceNameListFragment; | ||
| 11 | +import com.example.moudle_pedometer.R; | ||
| 12 | + | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 赛事名称轨迹列表 | ||
| 16 | + * Created by hanyayun 019/06/25. | ||
| 17 | + */ | ||
| 18 | +public class RaceNameListActivity extends AppCompatActivity { | ||
| 19 | + | ||
| 20 | + public static void newInstance(Context context,String eventId){ | ||
| 21 | + Intent intent = new Intent(context,RaceNameListActivity.class); | ||
| 22 | + intent.putExtra("eventId",eventId); | ||
| 23 | + context.startActivity(intent); | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + @Override | ||
| 27 | + protected void onCreate(Bundle savedInstanceState) { | ||
| 28 | + super.onCreate(savedInstanceState); | ||
| 29 | + StatusBarUtil.setStatusBarWrite(this); | ||
| 30 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.white), 0); | ||
| 31 | + setContentView(R.layout.activity_race_name_list); | ||
| 32 | + getSupportFragmentManager().beginTransaction().replace(R.id.race_container,RaceNameListFragment.newInstance(getIntent().getStringExtra("eventId"))).commit(); | ||
| 33 | + } | ||
| 34 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/adapter/RaceNameListAdapter.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.ui.adapter; | ||
| 2 | + | ||
| 3 | +import android.app.Activity; | ||
| 4 | +import android.support.annotation.NonNull; | ||
| 5 | +import android.support.v7.widget.RecyclerView; | ||
| 6 | +import android.view.LayoutInflater; | ||
| 7 | +import android.view.View; | ||
| 8 | +import android.view.ViewGroup; | ||
| 9 | +import android.widget.ImageView; | ||
| 10 | +import android.widget.LinearLayout; | ||
| 11 | +import android.widget.TextView; | ||
| 12 | + | ||
| 13 | +import com.bumptech.glide.Glide; | ||
| 14 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 15 | +import com.cnlive.moudle.pedometer.utils.TimeUtil; | ||
| 16 | +import com.example.moudle_pedometer.R; | ||
| 17 | + | ||
| 18 | +import java.util.ArrayList; | ||
| 19 | +import java.util.List; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * Created by hanyayun 019/06/25. | ||
| 23 | + */ | ||
| 24 | +public class RaceNameListAdapter extends RecyclerView.Adapter<RaceNameListAdapter.MyViewHolder> { | ||
| 25 | + | ||
| 26 | + private List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); | ||
| 27 | + private Activity context; | ||
| 28 | + private OnItemClick onItemClick; | ||
| 29 | + private OnAddShoeLineClick onAddShoeLineClick; | ||
| 30 | + private OnDelectShoeLineClick onDelectShoeLineClick; | ||
| 31 | + | ||
| 32 | + public void setOnItemClick(OnItemClick onItemClick) { | ||
| 33 | + this.onItemClick = onItemClick; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public void setOnAddShoeLineClick(OnAddShoeLineClick onAddShoeLineClick) { | ||
| 37 | + this.onAddShoeLineClick = onAddShoeLineClick; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setOnDelectShoeLineClick(OnDelectShoeLineClick onDelectShoeLineClick) { | ||
| 41 | + this.onDelectShoeLineClick = onDelectShoeLineClick; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + public RaceNameListAdapter(List<RaceNameListInfo.EventShoeLinesBean> list, Activity context) { | ||
| 45 | + this.list = list; | ||
| 46 | + this.context = context; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + @NonNull | ||
| 50 | + @Override | ||
| 51 | + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { | ||
| 52 | + View view = LayoutInflater.from(context).inflate(R.layout.item_race_name_list, viewGroup, false); | ||
| 53 | + return new MyViewHolder(view); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @Override | ||
| 57 | + public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i) { | ||
| 58 | + myViewHolder.record_time_day.setText(TimeUtil.getStampToTime(list.get(i).getCreateTime(),"yy/MM/dd")); | ||
| 59 | + myViewHolder.record_time.setText(TimeUtil.getStampToTime(list.get(i).getCreateTime(),"HH:mm")); | ||
| 60 | + Glide.with(context).load(list.get(i).getRoadmap()).into(myViewHolder.item_img); | ||
| 61 | + myViewHolder.kilometer_num.setText(list.get(i).getMileage()); | ||
| 62 | + myViewHolder.tv_start_addr.setText(list.get(i).getStartLocation()); | ||
| 63 | + myViewHolder.tv_end_addr.setText(list.get(i).getEndLocation()); | ||
| 64 | + myViewHolder.shoe_ly.setOnClickListener(new View.OnClickListener() { | ||
| 65 | + @Override | ||
| 66 | + public void onClick(View v) { | ||
| 67 | + if(onItemClick != null)onItemClick.onItemClickListener(list.get(i),i); | ||
| 68 | + } | ||
| 69 | + }); | ||
| 70 | + | ||
| 71 | + if(list.get(i).getIsEnable() == 0){ | ||
| 72 | + myViewHolder.has_path.setText("已绑定轨迹"); | ||
| 73 | + myViewHolder.has_path.setTextColor(context.getResources().getColor(R.color.text_gray99)); | ||
| 74 | + myViewHolder.has_path.setBackground(context.getResources().getDrawable(R.drawable.gray_raduis_bg)); | ||
| 75 | + myViewHolder.delect_path.setTextColor(context.getResources().getColor(R.color.text_gray99)); | ||
| 76 | + myViewHolder.delect_path.setBackground(context.getResources().getDrawable(R.drawable.gray_raduis_bg)); | ||
| 77 | + }else { | ||
| 78 | + myViewHolder.has_path.setText("绑定轨迹"); | ||
| 79 | + myViewHolder.has_path.setTextColor(context.getResources().getColor(R.color.green_tx)); | ||
| 80 | + myViewHolder.has_path.setBackground(context.getResources().getDrawable(R.drawable.green_raduis_bg)); | ||
| 81 | + myViewHolder.delect_path.setTextColor(context.getResources().getColor(R.color.green_tx)); | ||
| 82 | + myViewHolder.delect_path.setBackground(context.getResources().getDrawable(R.drawable.green_raduis_bg)); | ||
| 83 | + myViewHolder.has_path.setOnClickListener(new View.OnClickListener() { | ||
| 84 | + @Override | ||
| 85 | + public void onClick(View v) { | ||
| 86 | + if(onAddShoeLineClick != null)onAddShoeLineClick.onAddSholeLineClickListener(list.get(i),i); | ||
| 87 | + } | ||
| 88 | + }); | ||
| 89 | + myViewHolder.delect_path.setOnClickListener(new View.OnClickListener() { | ||
| 90 | + @Override | ||
| 91 | + public void onClick(View v) { | ||
| 92 | + if(onDelectShoeLineClick != null)onDelectShoeLineClick.onDelectShoeLineClickListener(list.get(i),i); | ||
| 93 | + } | ||
| 94 | + }); | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + @Override | ||
| 99 | + public int getItemCount() { | ||
| 100 | + return list.size(); | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + class MyViewHolder extends RecyclerView.ViewHolder { | ||
| 104 | + | ||
| 105 | + LinearLayout shoe_ly; | ||
| 106 | + TextView record_time_day; | ||
| 107 | + TextView record_time; | ||
| 108 | + ImageView item_img; | ||
| 109 | + TextView kilometer_num; | ||
| 110 | + TextView tv_start_addr; | ||
| 111 | + TextView tv_end_addr; | ||
| 112 | + TextView has_path; | ||
| 113 | + TextView delect_path; | ||
| 114 | + | ||
| 115 | + public MyViewHolder(@NonNull View itemView) { | ||
| 116 | + super(itemView); | ||
| 117 | + shoe_ly = itemView.findViewById(R.id.shoe_ly); | ||
| 118 | + record_time_day = itemView.findViewById(R.id.record_time_day); | ||
| 119 | + record_time = itemView.findViewById(R.id.record_time); | ||
| 120 | + item_img = itemView.findViewById(R.id.item_img); | ||
| 121 | + kilometer_num = itemView.findViewById(R.id.kilometer_num); | ||
| 122 | + tv_start_addr = itemView.findViewById(R.id.tv_start_addr); | ||
| 123 | + tv_end_addr = itemView.findViewById(R.id.tv_end_addr); | ||
| 124 | + has_path = itemView.findViewById(R.id.has_path); | ||
| 125 | + delect_path = itemView.findViewById(R.id.delect_path); | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public interface OnItemClick{ | ||
| 130 | + void onItemClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean,int position); | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public interface OnAddShoeLineClick{ | ||
| 134 | + void onAddSholeLineClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean,int position); | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public interface OnDelectShoeLineClick{ | ||
| 138 | + void onDelectShoeLineClickListener(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean,int position); | ||
| 139 | + } | ||
| 140 | +} | ||
| 141 | + |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/adapter/RunListAdapter.java
| 1 | package com.cnlive.moudle.collectionTrace.ui.adapter; | 1 | package com.cnlive.moudle.collectionTrace.ui.adapter; |
| 2 | 2 | ||
| 3 | import android.app.Activity; | 3 | import android.app.Activity; |
| 4 | -import android.content.Context; | ||
| 5 | import android.support.annotation.NonNull; | 4 | import android.support.annotation.NonNull; |
| 6 | import android.support.v7.widget.RecyclerView; | 5 | import android.support.v7.widget.RecyclerView; |
| 7 | import android.view.LayoutInflater; | 6 | import android.view.LayoutInflater; |
| @@ -9,6 +8,7 @@ import android.view.View; | @@ -9,6 +8,7 @@ import android.view.View; | ||
| 9 | import android.view.ViewGroup; | 8 | import android.view.ViewGroup; |
| 10 | import android.widget.TextView; | 9 | import android.widget.TextView; |
| 11 | 10 | ||
| 11 | +import com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity; | ||
| 12 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; | 12 | import com.cnlive.moudle.pedometer.net.bean.RunLineInfo; |
| 13 | import com.cnlive.moudle.pedometer.utils.TimeUtil; | 13 | import com.cnlive.moudle.pedometer.utils.TimeUtil; |
| 14 | import com.example.moudle_pedometer.R; | 14 | import com.example.moudle_pedometer.R; |
| @@ -41,8 +41,9 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo | @@ -41,8 +41,9 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo | ||
| 41 | myViewHolder.line_name.setText(list.get(i).getTitle()); | 41 | myViewHolder.line_name.setText(list.get(i).getTitle()); |
| 42 | myViewHolder.activity_time.setText(TimeUtil.getStampToTime(list.get(i).getStart_time(), "yyyy.MM.dd") + "——" + TimeUtil.getStampToTime(list.get(i).getEnd_time(), "yyyy.MM.dd")); | 42 | myViewHolder.activity_time.setText(TimeUtil.getStampToTime(list.get(i).getStart_time(), "yyyy.MM.dd") + "——" + TimeUtil.getStampToTime(list.get(i).getEnd_time(), "yyyy.MM.dd")); |
| 43 | myViewHolder.line_address.setText(list.get(i).getAddress() + " " + list.get(i).getMileage()); | 43 | myViewHolder.line_address.setText(list.get(i).getAddress() + " " + list.get(i).getMileage()); |
| 44 | + //添加轨迹 | ||
| 44 | // myViewHolder.add_path.setOnClickListener(v -> ); | 45 | // myViewHolder.add_path.setOnClickListener(v -> ); |
| 45 | -// myViewHolder.path_list.setOnClickListener(v -> ); | 46 | + myViewHolder.path_list.setOnClickListener(v -> RaceNameListActivity.newInstance(context,list.get(i).getId()+"")); |
| 46 | } | 47 | } |
| 47 | 48 | ||
| 48 | @Override | 49 | @Override |
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/RaceNameListFragment.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.ui.fragment; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import android.os.Bundle; | ||
| 5 | +import android.support.annotation.Nullable; | ||
| 6 | +import android.view.View; | ||
| 7 | + | ||
| 8 | +import com.cnlive.libs.base.frame.fragment.MvpBindingFragment; | ||
| 9 | +import com.cnlive.moudle.collectionTrace.frame.presenter.RaceNameListPresenter; | ||
| 10 | +import com.cnlive.moudle.collectionTrace.frame.view.RaceNameListView; | ||
| 11 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 12 | +import com.example.moudle_pedometer.R; | ||
| 13 | +import com.example.moudle_pedometer.databinding.FragmentRaceNameListBinding; | ||
| 14 | + | ||
| 15 | +/** | ||
| 16 | + * Created by hanyayun 019/06/25. | ||
| 17 | + */ | ||
| 18 | +public class RaceNameListFragment extends MvpBindingFragment<RaceNameListView, RaceNameListPresenter,Object, FragmentRaceNameListBinding> { | ||
| 19 | + | ||
| 20 | + public int currentPage = 1; | ||
| 21 | + public int pageSize = 10; | ||
| 22 | + private String eventId; | ||
| 23 | + | ||
| 24 | + public static RaceNameListFragment newInstance(String eventId){ | ||
| 25 | + RaceNameListFragment fragment = new RaceNameListFragment(); | ||
| 26 | + Bundle bundle = new Bundle(); | ||
| 27 | + bundle.putString("eventId",eventId); | ||
| 28 | + fragment.setArguments(bundle); | ||
| 29 | + return fragment; | ||
| 30 | + } | ||
| 31 | + public RaceNameListFragment() { | ||
| 32 | + // Required empty public constructor | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | ||
| 38 | + super.onViewCreated(view, savedInstanceState); | ||
| 39 | + if(getMvpView() != null) getMvpView().initView(); | ||
| 40 | + eventId = getArguments().getString("eventId"); | ||
| 41 | + getPresenter().setData(getActivity(),"117",currentPage,pageSize); | ||
| 42 | + binding.refreshLayout.setOnRefreshListener(v ->{ | ||
| 43 | + currentPage = 1; | ||
| 44 | + getPresenter().setData(getActivity(),"117",currentPage,pageSize); | ||
| 45 | + }); | ||
| 46 | + binding.refreshLayout.setOnLoadMoreListener(v ->{ | ||
| 47 | + currentPage++; | ||
| 48 | + getPresenter().setData(getActivity(),"117",currentPage,pageSize); | ||
| 49 | + }); | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + @Override | ||
| 53 | + protected int getLayoutId() { | ||
| 54 | + return R.layout.fragment_race_name_list; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + | ||
| 58 | + public void addShoeLine(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean,int position){ | ||
| 59 | + getPresenter().bindingShoeLine(getActivity(),eventShoeLinesBean.getId(),eventShoeLinesBean.getEventId(),position); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void delectShoeLine(RaceNameListInfo.EventShoeLinesBean eventShoeLinesBean,int position){ | ||
| 63 | + getPresenter().delectShoeLine(getActivity(),eventShoeLinesBean.getId(),position); | ||
| 64 | + } | ||
| 65 | +} |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/net/ApiServiceRunLin.java
| 1 | package com.cnlive.moudle.pedometer.net; | 1 | package com.cnlive.moudle.pedometer.net; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 4 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; | 5 | import com.cnlive.moudle.pedometer.net.bean.BaseInfo; |
| 5 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; | 6 | import com.cnlive.moudle.pedometer.net.bean.MyRecordInfo; |
| 6 | import com.cnlive.moudle.pedometer.net.bean.RaceRecordInfo; | 7 | import com.cnlive.moudle.pedometer.net.bean.RaceRecordInfo; |
| @@ -71,5 +72,24 @@ public interface ApiServiceRunLin { | @@ -71,5 +72,24 @@ public interface ApiServiceRunLin { | ||
| 71 | @POST("Daren/event/routeRecord.action") | 72 | @POST("Daren/event/routeRecord.action") |
| 72 | Observable<Result<BaseInfo>> saveRouteData(@QueryMap() Map<String, String> maps); | 73 | Observable<Result<BaseInfo>> saveRouteData(@QueryMap() Map<String, String> maps); |
| 73 | 74 | ||
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * 踩点轨迹列表 | ||
| 78 | + */ | ||
| 79 | + @POST("Daren/event/getShoeLineList.action") | ||
| 80 | + Observable<Result<BaseInfo<RaceNameListInfo>>> getRaceNameListInfo(@QueryMap() Map<String, String> maps); | ||
| 81 | + | ||
| 82 | + /** | ||
| 83 | + * 踩点轨迹删除 | ||
| 84 | + */ | ||
| 85 | + @POST("Daren/event/deleteShoeLine.action") | ||
| 86 | + Observable<Result<BaseInfo>> deleteShoeLineInfo(@QueryMap() Map<String, String> maps); | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 踩点轨迹绑定 | ||
| 90 | + */ | ||
| 91 | + @POST("Daren/event/bindingShoeLine.action") | ||
| 92 | + Observable<Result<BaseInfo>> bindingShoeLineInfo(@QueryMap() Map<String, String> maps); | ||
| 93 | + | ||
| 74 | } | 94 | } |
| 75 | 95 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/RaceRecordAdapter.java
| @@ -12,6 +12,9 @@ import android.widget.RelativeLayout; | @@ -12,6 +12,9 @@ import android.widget.RelativeLayout; | ||
| 12 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | +import com.bumptech.glide.Glide; | ||
| 16 | +import com.bumptech.glide.load.resource.bitmap.CircleCrop; | ||
| 17 | +import com.bumptech.glide.request.RequestOptions; | ||
| 15 | import com.cnlive.moudle.pedometer.net.bean.EventRouteRecordBeanVoListBean; | 18 | import com.cnlive.moudle.pedometer.net.bean.EventRouteRecordBeanVoListBean; |
| 16 | import com.cnlive.moudle.pedometer.utils.TimeUtil; | 19 | import com.cnlive.moudle.pedometer.utils.TimeUtil; |
| 17 | import com.example.moudle_pedometer.R; | 20 | import com.example.moudle_pedometer.R; |
| @@ -52,6 +55,7 @@ public class RaceRecordAdapter extends RecyclerView.Adapter<RaceRecordAdapter.My | @@ -52,6 +55,7 @@ public class RaceRecordAdapter extends RecyclerView.Adapter<RaceRecordAdapter.My | ||
| 52 | myHolder.record_minit.setText(list.get(i).getEmployTime()); | 55 | myHolder.record_minit.setText(list.get(i).getEmployTime()); |
| 53 | myHolder.record_speed.setText(list.get(i).getPace()); | 56 | myHolder.record_speed.setText(list.get(i).getPace()); |
| 54 | myHolder.record_step.setText(list.get(i).getStep()); | 57 | myHolder.record_step.setText(list.get(i).getStep()); |
| 58 | + Glide.with(context).load(list.get(i).getRoadmap()).into(myHolder.item_img); | ||
| 55 | if(onClickListener != null) myHolder.ry_re.setOnClickListener(v -> onClickListener.onClickListener(list.get(i),i)); | 59 | if(onClickListener != null) myHolder.ry_re.setOnClickListener(v -> onClickListener.onClickListener(list.get(i),i)); |
| 56 | } | 60 | } |
| 57 | 61 |
moudle_pedometer/src/main/res/drawable/gray_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 | + <stroke | ||
| 6 | + android:width="1dp" | ||
| 7 | + android:color="#999999" /> | ||
| 8 | +</shape> | ||
| 0 | \ No newline at end of file | 9 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/activity_race_list.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | - xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | xmlns:tools="http://schemas.android.com/tools" | 3 | xmlns:tools="http://schemas.android.com/tools" |
| 5 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 6 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
moudle_pedometer/src/main/res/layout/activity_race_name_list.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + xmlns:app="http://schemas.android.com/apk/res-auto" | ||
| 4 | + xmlns:tools="http://schemas.android.com/tools" | ||
| 5 | + android:layout_width="match_parent" | ||
| 6 | + android:layout_height="match_parent" | ||
| 7 | + tools:context="com.cnlive.moudle.collectionTrace.ui.activity.RaceNameListActivity"> | ||
| 8 | + | ||
| 9 | + <RelativeLayout | ||
| 10 | + android:id="@+id/race_container" | ||
| 11 | + android:layout_width="match_parent" | ||
| 12 | + android:layout_height="match_parent"/> | ||
| 13 | +</RelativeLayout> |
moudle_pedometer/src/main/res/layout/fragment_race_list.xml
| @@ -19,10 +19,11 @@ | @@ -19,10 +19,11 @@ | ||
| 19 | <android.support.v7.widget.RecyclerView | 19 | <android.support.v7.widget.RecyclerView |
| 20 | android:id="@+id/race_recy" | 20 | android:id="@+id/race_recy" |
| 21 | android:layout_width="match_parent" | 21 | android:layout_width="match_parent" |
| 22 | - android:layout_height="wrap_content" | ||
| 23 | - android:layout_margin="10dp" | ||
| 24 | - android:background="@color/white" | ||
| 25 | - android:padding="10dp" /> | 22 | + android:layout_height="match_parent" |
| 23 | + android:layout_marginTop="5dp" | ||
| 24 | + android:layout_marginLeft="5dp" | ||
| 25 | + android:layout_marginRight="5dp" | ||
| 26 | + android:background="#F8F8F8"/> | ||
| 26 | </com.scwang.smartrefresh.layout.SmartRefreshLayout> | 27 | </com.scwang.smartrefresh.layout.SmartRefreshLayout> |
| 27 | 28 | ||
| 28 | 29 |
moudle_pedometer/src/main/res/layout/fragment_race_name_list.xml
0 → 100644
| 1 | +<layout xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| 2 | + <LinearLayout | ||
| 3 | + xmlns:tools="http://schemas.android.com/tools" | ||
| 4 | + android:layout_width="match_parent" | ||
| 5 | + android:layout_height="match_parent" | ||
| 6 | + android:orientation="vertical" | ||
| 7 | + android:background="#F8F8F8" | ||
| 8 | + tools:context="com.cnlive.moudle.collectionTrace.ui.fragment.RaceNameListFragment"> | ||
| 9 | + | ||
| 10 | + <RelativeLayout | ||
| 11 | + android:layout_width="match_parent" | ||
| 12 | + android:layout_height="?attr/qmui_topbar_height" | ||
| 13 | + android:background="@color/white"> | ||
| 14 | + | ||
| 15 | + <ImageView | ||
| 16 | + android:id="@+id/race_back" | ||
| 17 | + android:layout_width="wrap_content" | ||
| 18 | + android:layout_height="wrap_content" | ||
| 19 | + android:src="@drawable/top_back_black" | ||
| 20 | + android:layout_centerVertical="true" | ||
| 21 | + android:padding="10dp" | ||
| 22 | + /> | ||
| 23 | + | ||
| 24 | + <TextView | ||
| 25 | + android:id="@+id/race_tittle" | ||
| 26 | + android:layout_width="wrap_content" | ||
| 27 | + android:layout_height="wrap_content" | ||
| 28 | + android:layout_centerInParent="true" | ||
| 29 | + android:textSize="16sp" | ||
| 30 | + android:textColor="#333333" | ||
| 31 | + /> | ||
| 32 | + | ||
| 33 | + <TextView | ||
| 34 | + android:id="@+id/into_path" | ||
| 35 | + android:layout_width="wrap_content" | ||
| 36 | + android:layout_height="wrap_content" | ||
| 37 | + android:textSize="13sp" | ||
| 38 | + android:textColor="#333333" | ||
| 39 | + android:layout_alignParentRight="true" | ||
| 40 | + android:layout_centerVertical="true" | ||
| 41 | + android:padding="10dp" | ||
| 42 | + android:text="@string/add_path" | ||
| 43 | + /> | ||
| 44 | + </RelativeLayout> | ||
| 45 | + | ||
| 46 | + <com.scwang.smartrefresh.layout.SmartRefreshLayout | ||
| 47 | + android:id="@+id/refreshLayout" | ||
| 48 | + android:layout_width="match_parent" | ||
| 49 | + android:layout_height="match_parent"> | ||
| 50 | + | ||
| 51 | + <android.support.v7.widget.RecyclerView | ||
| 52 | + android:id="@+id/race_recy" | ||
| 53 | + android:layout_width="match_parent" | ||
| 54 | + android:layout_height="match_parent" | ||
| 55 | + android:layout_marginTop="5dp" | ||
| 56 | + android:layout_marginLeft="5dp" | ||
| 57 | + android:layout_marginRight="5dp"/> | ||
| 58 | + </com.scwang.smartrefresh.layout.SmartRefreshLayout> | ||
| 59 | + | ||
| 60 | + <com.cnlive.strike.ui.widget.UIEmptyView | ||
| 61 | + android:id="@+id/empty" | ||
| 62 | + android:layout_width="match_parent" | ||
| 63 | + android:layout_height="match_parent" | ||
| 64 | + android:visibility="gone" /> | ||
| 65 | + </LinearLayout> | ||
| 66 | +</layout> | ||
| 67 | + |
moudle_pedometer/src/main/res/layout/item_race_name_list.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="utf-8"?> | ||
| 2 | +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 3 | + android:layout_width="match_parent" | ||
| 4 | + android:layout_height="wrap_content" | ||
| 5 | + android:layout_margin="5dp" | ||
| 6 | + android:orientation="vertical" | ||
| 7 | + android:id="@+id/shoe_ly" | ||
| 8 | + android:background="@color/white" | ||
| 9 | + android:padding="10dp"> | ||
| 10 | + | ||
| 11 | + <LinearLayout | ||
| 12 | + android:layout_width="match_parent" | ||
| 13 | + android:layout_height="wrap_content" | ||
| 14 | + android:orientation="horizontal"> | ||
| 15 | + | ||
| 16 | + <TextView | ||
| 17 | + android:id="@+id/record_time_day" | ||
| 18 | + android:layout_width="wrap_content" | ||
| 19 | + android:layout_height="wrap_content" | ||
| 20 | + android:text="2017/05/01" | ||
| 21 | + android:textColor="#333333" | ||
| 22 | + android:textSize="14sp" /> | ||
| 23 | + | ||
| 24 | + <TextView | ||
| 25 | + android:id="@+id/record_time" | ||
| 26 | + android:layout_width="wrap_content" | ||
| 27 | + android:layout_height="wrap_content" | ||
| 28 | + android:layout_marginLeft="15dp" | ||
| 29 | + android:layout_toRightOf="@id/record_time_day" | ||
| 30 | + android:text="15:30" | ||
| 31 | + android:textColor="#999999" | ||
| 32 | + android:textSize="14sp" /> | ||
| 33 | + | ||
| 34 | + </LinearLayout> | ||
| 35 | + | ||
| 36 | + <View | ||
| 37 | + android:layout_width="match_parent" | ||
| 38 | + android:layout_height="1dp" | ||
| 39 | + android:layout_marginTop="5dp" | ||
| 40 | + android:background="#F4F4F4" /> | ||
| 41 | + | ||
| 42 | + <LinearLayout | ||
| 43 | + android:id="@+id/ry_re" | ||
| 44 | + android:layout_width="match_parent" | ||
| 45 | + android:layout_height="wrap_content" | ||
| 46 | + android:layout_marginTop="5dp" | ||
| 47 | + android:orientation="horizontal"> | ||
| 48 | + | ||
| 49 | + <ImageView | ||
| 50 | + android:id="@+id/item_img" | ||
| 51 | + android:layout_width="80dp" | ||
| 52 | + android:layout_height="80dp" | ||
| 53 | + android:src="@drawable/defaults" /> | ||
| 54 | + | ||
| 55 | + <LinearLayout | ||
| 56 | + android:layout_width="match_parent" | ||
| 57 | + android:layout_height="wrap_content" | ||
| 58 | + android:layout_marginLeft="15dp" | ||
| 59 | + android:orientation="vertical"> | ||
| 60 | + | ||
| 61 | + <TextView | ||
| 62 | + android:id="@+id/kilometer_num" | ||
| 63 | + android:layout_width="wrap_content" | ||
| 64 | + android:layout_height="wrap_content" | ||
| 65 | + android:text="4.42 公里" | ||
| 66 | + android:textColor="#333333" | ||
| 67 | + android:textSize="16sp" /> | ||
| 68 | + | ||
| 69 | + <LinearLayout | ||
| 70 | + android:layout_width="match_parent" | ||
| 71 | + android:layout_height="wrap_content" | ||
| 72 | + android:layout_marginTop="5dp"> | ||
| 73 | + | ||
| 74 | + <ImageView | ||
| 75 | + android:layout_width="10dp" | ||
| 76 | + android:layout_height="10dp" | ||
| 77 | + android:layout_gravity="center_vertical" | ||
| 78 | + android:background="@drawable/shape_circle_green" /> | ||
| 79 | + | ||
| 80 | + <TextView | ||
| 81 | + android:layout_width="wrap_content" | ||
| 82 | + android:layout_height="wrap_content" | ||
| 83 | + android:layout_marginLeft="5dp" | ||
| 84 | + android:text="@string/layout_street_start_point" | ||
| 85 | + android:textColor="@color/bottom_sheet_dialog_race_location_text" | ||
| 86 | + android:textSize="12sp" /> | ||
| 87 | + | ||
| 88 | + <TextView | ||
| 89 | + android:id="@+id/tv_start_addr" | ||
| 90 | + android:layout_width="wrap_content" | ||
| 91 | + android:layout_height="wrap_content" | ||
| 92 | + android:layout_marginLeft="10dp" | ||
| 93 | + android:text="首都师范大学操场东门" | ||
| 94 | + android:textColor="@color/text_black" | ||
| 95 | + android:textSize="12sp" /> | ||
| 96 | + </LinearLayout> | ||
| 97 | + | ||
| 98 | + <LinearLayout | ||
| 99 | + android:layout_width="match_parent" | ||
| 100 | + android:layout_height="wrap_content" | ||
| 101 | + android:layout_marginTop="5dp"> | ||
| 102 | + | ||
| 103 | + <ImageView | ||
| 104 | + android:layout_width="10dp" | ||
| 105 | + android:layout_height="10dp" | ||
| 106 | + android:layout_gravity="center_vertical" | ||
| 107 | + android:background="@drawable/shape_circle_red" /> | ||
| 108 | + | ||
| 109 | + <TextView | ||
| 110 | + android:layout_width="wrap_content" | ||
| 111 | + android:layout_height="wrap_content" | ||
| 112 | + android:layout_marginLeft="5dp" | ||
| 113 | + android:text="@string/layout_street_end_point" | ||
| 114 | + android:textColor="@color/bottom_sheet_dialog_race_location_text" | ||
| 115 | + android:textSize="12sp" /> | ||
| 116 | + | ||
| 117 | + <TextView | ||
| 118 | + android:id="@+id/tv_end_addr" | ||
| 119 | + android:layout_width="wrap_content" | ||
| 120 | + android:layout_height="wrap_content" | ||
| 121 | + android:layout_marginLeft="10dp" | ||
| 122 | + android:text="首都师范大学操场西门" | ||
| 123 | + android:textColor="@color/text_black" | ||
| 124 | + android:textSize="12sp" /> | ||
| 125 | + </LinearLayout> | ||
| 126 | + | ||
| 127 | + <LinearLayout | ||
| 128 | + android:layout_width="wrap_content" | ||
| 129 | + android:layout_height="wrap_content" | ||
| 130 | + android:layout_gravity="right" | ||
| 131 | + android:layout_marginTop="12dp" | ||
| 132 | + android:orientation="horizontal"> | ||
| 133 | + | ||
| 134 | + <TextView | ||
| 135 | + android:id="@+id/has_path" | ||
| 136 | + android:layout_width="wrap_content" | ||
| 137 | + android:layout_height="wrap_content" | ||
| 138 | + android:background="@drawable/green_raduis_bg" | ||
| 139 | + android:paddingLeft="11dp" | ||
| 140 | + android:paddingTop="7dp" | ||
| 141 | + android:paddingRight="11dp" | ||
| 142 | + android:paddingBottom="7dp" | ||
| 143 | + android:text="@string/addpath" | ||
| 144 | + android:textColor="@color/green_tx" | ||
| 145 | + android:textSize="12sp" /> | ||
| 146 | + | ||
| 147 | + <TextView | ||
| 148 | + android:id="@+id/delect_path" | ||
| 149 | + android:layout_width="wrap_content" | ||
| 150 | + android:layout_height="wrap_content" | ||
| 151 | + android:layout_marginLeft="15dp" | ||
| 152 | + android:background="@drawable/green_raduis_bg" | ||
| 153 | + android:paddingLeft="10dp" | ||
| 154 | + android:paddingTop="7dp" | ||
| 155 | + android:paddingRight="10dp" | ||
| 156 | + android:paddingBottom="7dp" | ||
| 157 | + android:text="@string/delect" | ||
| 158 | + android:textColor="#36C28D" | ||
| 159 | + android:textSize="12sp" /> | ||
| 160 | + </LinearLayout> | ||
| 161 | + | ||
| 162 | + </LinearLayout> | ||
| 163 | + </LinearLayout> | ||
| 164 | +</LinearLayout> | ||
| 0 | \ No newline at end of file | 165 | \ No newline at end of file |
moudle_pedometer/src/main/res/layout/item_record.xml
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | android:id="@+id/item_ly" | 3 | android:id="@+id/item_ly" |
| 4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
| 5 | android:layout_height="wrap_content" | 5 | android:layout_height="wrap_content" |
| 6 | - android:layout_margin="10dp" | 6 | + android:layout_margin="5dp" |
| 7 | android:background="@color/white" | 7 | android:background="@color/white" |
| 8 | android:orientation="vertical"> | 8 | android:orientation="vertical"> |
| 9 | 9 | ||
| @@ -63,6 +63,7 @@ | @@ -63,6 +63,7 @@ | ||
| 63 | android:layout_height="wrap_content" | 63 | android:layout_height="wrap_content" |
| 64 | android:layout_marginLeft="10dp" | 64 | android:layout_marginLeft="10dp" |
| 65 | android:textColor="#999999" | 65 | android:textColor="#999999" |
| 66 | + android:singleLine="true" | ||
| 66 | android:textSize="12sp" /> | 67 | android:textSize="12sp" /> |
| 67 | </LinearLayout> | 68 | </LinearLayout> |
| 68 | 69 |
moudle_pedometer/src/main/res/values/strings.xml
| @@ -85,6 +85,9 @@ | @@ -85,6 +85,9 @@ | ||
| 85 | <string name="exit_range_tip">您已偏离路径轨迹 请您计时回归路径!</string> | 85 | <string name="exit_range_tip">您已偏离路径轨迹 请您计时回归路径!</string> |
| 86 | <string name="more_than_pause_count_tip">您已超过最大暂停次数,无法继续比赛!</string> | 86 | <string name="more_than_pause_count_tip">您已超过最大暂停次数,无法继续比赛!</string> |
| 87 | <string name="run_pause_tip">固定赛事只可暂停一次\n是否确定使用?</string> | 87 | <string name="run_pause_tip">固定赛事只可暂停一次\n是否确定使用?</string> |
| 88 | + <string name="add_path">添加轨迹</string> | ||
| 89 | + <string name="addpath">绑定轨迹</string> | ||
| 90 | + <string name="delect">删除</string> | ||
| 88 | 91 | ||
| 89 | 92 | ||
| 90 | </resources> | 93 | </resources> |