Commit 40225442a159016f8228df55f8abff99286aee6f
1 parent
7ea646bd
赛事名称轨迹列表
Showing
20 changed files
with
771 additions
and
9 deletions
app/src/main/java/com/example/modulepedometer/MainActivity.java
| @@ -5,6 +5,7 @@ import android.os.Bundle; | @@ -5,6 +5,7 @@ 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.RaceNameListActivity; | ||
| 8 | import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity; | 9 | import com.cnlive.moudle.pedometer.ui.activity.RunLineActivity; |
| 9 | 10 | ||
| 10 | 11 | ||
| @@ -15,7 +16,7 @@ public class MainActivity extends AppCompatActivity { | @@ -15,7 +16,7 @@ public class MainActivity extends AppCompatActivity { | ||
| 15 | super.onCreate(savedInstanceState); | 16 | super.onCreate(savedInstanceState); |
| 16 | setContentView(R.layout.activity_main); | 17 | setContentView(R.layout.activity_main); |
| 17 | // RunLineActivity.newInstance(this,null,null,null); | 18 | // RunLineActivity.newInstance(this,null,null,null); |
| 18 | - Intent intent = new Intent(this, CollRunRaceDetailActivity.class); | 19 | + Intent intent = new Intent(this, RaceNameListActivity.class); |
| 19 | startActivity(intent); | 20 | startActivity(intent); |
| 20 | // ARouter.getInstance() | 21 | // ARouter.getInstance() |
| 21 | //// .build("/moudle_pedometer/InterestActivity") | 22 | //// .build("/moudle_pedometer/InterestActivity") |
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 | + public void setData(Context context,String eventId, int pageNo, int pageSize){ | ||
| 26 | + HashMap<String, String> map = new HashMap<>(); | ||
| 27 | + map.put("eventId", eventId); | ||
| 28 | + map.put("pageNo", pageNo+""); | ||
| 29 | + map.put("pageSize", pageSize+""); | ||
| 30 | + getView().showLoading(); | ||
| 31 | + Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RaceNameListInfo>>() { | ||
| 32 | + @Override | ||
| 33 | + public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RaceNameListInfo>> dataCallback) { | ||
| 34 | + return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.getRaceNameListInfo(stringStringMap)).subscribe(context, dataCallback); | ||
| 35 | + } | ||
| 36 | + }).<BaseInfo<RaceNameListInfo>>event().setFailureCallback(new FailureCallback() { | ||
| 37 | + @Override | ||
| 38 | + public void onFailure(int code, String message) { | ||
| 39 | + if (getView() != null) { | ||
| 40 | + getView().showErr(message); | ||
| 41 | + getView().hideLoading(); | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + }).setSuccessCallback(new SuccessCallback<BaseInfo<RaceNameListInfo>>() { | ||
| 45 | + @Override | ||
| 46 | + public void onSuccess(BaseInfo<RaceNameListInfo> registerInfo) { | ||
| 47 | + if (getView() != null){ | ||
| 48 | + getView().onSuccess(registerInfo); | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + }).start(); | ||
| 52 | + } | ||
| 53 | +} |
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 | + public void onSuccess(BaseInfo<RaceNameListInfo> raceNameListInfoBaseInfo){ | ||
| 49 | + hideLoading(); | ||
| 50 | + if(fragment.currentPage == 1){ | ||
| 51 | + list.clear(); | ||
| 52 | + list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); | ||
| 53 | + if(adapter == null){ | ||
| 54 | + adapter = new RaceNameListAdapter(list,fragment.getActivity()); | ||
| 55 | + fragment.binding.raceRecy.setAdapter(adapter); | ||
| 56 | +// adapter.setClickListener(new RunLineAdapter.OnClickListener() { | ||
| 57 | +// @Override | ||
| 58 | +// public void onClickListener(RunLineInfo.ListBean bean, int position) { | ||
| 59 | +// RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+"",null,null,null,null); | ||
| 60 | +// } | ||
| 61 | +// }); | ||
| 62 | + }else { | ||
| 63 | + adapter.notifyDataSetChanged(); | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + if(list.size() != 0){ | ||
| 68 | + fragment.binding.empty.setVisibility(View.GONE); | ||
| 69 | + fragment.binding.refreshLayout.setVisibility(View.VISIBLE); | ||
| 70 | + }else { | ||
| 71 | + showEmpty(); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + if(raceNameListInfoBaseInfo.getData().getEventShoeLines().size() < fragment.pageSize){ | ||
| 75 | + fragment.binding.refreshLayout.setEnableLoadMore(false); | ||
| 76 | + }else { | ||
| 77 | + fragment.binding.refreshLayout.setEnableLoadMore(true); | ||
| 78 | + } | ||
| 79 | + if(fragment.currentPage > 1){ | ||
| 80 | + list.addAll(raceNameListInfoBaseInfo.getData().getEventShoeLines()); | ||
| 81 | + adapter.notifyDataSetChanged(); | ||
| 82 | + } | ||
| 83 | + fragment.binding.refreshLayout.finishRefresh(); | ||
| 84 | + fragment.binding.refreshLayout.finishLoadMore(); | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void showErr(String msg){ | ||
| 88 | + fragment.binding.refreshLayout.finishRefresh(); | ||
| 89 | + fragment.binding.refreshLayout.finishLoadMore(); | ||
| 90 | + if (list.size() == 0) { | ||
| 91 | + fragment.binding.empty.setVisibility(View.VISIBLE); | ||
| 92 | + fragment.binding.refreshLayout.setVisibility(View.GONE); | ||
| 93 | + fragment.binding.empty.setDetailText(fragment.getResources().getString(R.string.msg_failed_network_detail)); | ||
| 94 | + fragment.binding.empty.setTitleText(msg); | ||
| 95 | + fragment.binding.empty.setButton("重试", new View.OnClickListener() { | ||
| 96 | + @Override | ||
| 97 | + public void onClick(View v) { | ||
| 98 | + fragment.currentPage = 1; | ||
| 99 | + fragment.getPresenter().setData(fragment.getActivity(), CommonInfo.getUserId(fragment.getActivity()),fragment.currentPage,fragment.pageSize); | ||
| 100 | + } | ||
| 101 | + }); | ||
| 102 | + fragment.binding.empty.setLoadingShowing(false); | ||
| 103 | + fragment.binding.empty.setImage(R.drawable.wufalianjie); | ||
| 104 | + } else { | ||
| 105 | + fragment.binding.empty.setVisibility(View.GONE); | ||
| 106 | + fragment.binding.refreshLayout.setVisibility(View.VISIBLE); | ||
| 107 | + showToast(msg); | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public void showToast(String message) { | ||
| 112 | + AlertUtil.showDeftToast(fragment.getActivity(), message); | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public void showEmpty(){ | ||
| 116 | + fragment.binding.empty.setVisibility(View.VISIBLE); | ||
| 117 | + fragment.binding.refreshLayout.setVisibility(View.GONE); | ||
| 118 | + fragment.binding.empty.show("没有相关数据", "", R.drawable.zhuangtai_kong); | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + | ||
| 122 | + public void showLoading() { | ||
| 123 | + if (loadingDiaog != null) loadingDiaog.show(); | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + public void hideLoading() { | ||
| 127 | + if (loadingDiaog != null) loadingDiaog.dismiss(); | ||
| 128 | + } | ||
| 129 | +} |
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/RaceNameListActivity.java
0 → 100644
| 1 | +package com.cnlive.moudle.collectionTrace.ui.activity; | ||
| 2 | + | ||
| 3 | +import android.support.v7.app.AppCompatActivity; | ||
| 4 | +import android.os.Bundle; | ||
| 5 | + | ||
| 6 | +import com.cnlive.libs.base.util.StatusBarUtil; | ||
| 7 | +import com.cnlive.libs.base.util.StatusBarUtil2; | ||
| 8 | +import com.cnlive.moudle.collectionTrace.ui.fragment.RaceNameListFragment; | ||
| 9 | +import com.example.moudle_pedometer.R; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 赛事名称轨迹列表 | ||
| 13 | + * Created by hanyayun 019/06/25. | ||
| 14 | + */ | ||
| 15 | +public class RaceNameListActivity extends AppCompatActivity { | ||
| 16 | + | ||
| 17 | + @Override | ||
| 18 | + protected void onCreate(Bundle savedInstanceState) { | ||
| 19 | + super.onCreate(savedInstanceState); | ||
| 20 | + StatusBarUtil.setStatusBarWrite(this); | ||
| 21 | + StatusBarUtil2.setColor(this, getResources().getColor(R.color.white), 0); | ||
| 22 | + setContentView(R.layout.activity_race_name_list); | ||
| 23 | + getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceNameListFragment()).commit(); | ||
| 24 | + } | ||
| 25 | +} |
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.TextView; | ||
| 11 | + | ||
| 12 | +import com.bumptech.glide.Glide; | ||
| 13 | +import com.cnlive.moudle.collectionTrace.model.RaceNameListInfo; | ||
| 14 | +import com.cnlive.moudle.pedometer.utils.TimeUtil; | ||
| 15 | +import com.example.moudle_pedometer.R; | ||
| 16 | + | ||
| 17 | +import java.util.ArrayList; | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +/** | ||
| 21 | + * Created by hanyayun 019/06/25. | ||
| 22 | + */ | ||
| 23 | +public class RaceNameListAdapter extends RecyclerView.Adapter<RaceNameListAdapter.MyViewHolder> { | ||
| 24 | + | ||
| 25 | + private List<RaceNameListInfo.EventShoeLinesBean> list = new ArrayList<>(); | ||
| 26 | + private Activity context; | ||
| 27 | + | ||
| 28 | + public RaceNameListAdapter(List<RaceNameListInfo.EventShoeLinesBean> list, Activity context) { | ||
| 29 | + this.list = list; | ||
| 30 | + this.context = context; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + @NonNull | ||
| 34 | + @Override | ||
| 35 | + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { | ||
| 36 | + View view = LayoutInflater.from(context).inflate(R.layout.item_race_name_list, viewGroup, false); | ||
| 37 | + return new MyViewHolder(view); | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + @Override | ||
| 41 | + public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i) { | ||
| 42 | + myViewHolder.record_time_day.setText(TimeUtil.getStampToTime(list.get(i).getCreateTime(),"yy/MM/dd")); | ||
| 43 | + myViewHolder.record_time.setText(TimeUtil.getStampToTime(list.get(i).getCreateTime(),"HH:mm")); | ||
| 44 | + Glide.with(context).load(list.get(i).getRoadmap()).into(myViewHolder.item_img); | ||
| 45 | + myViewHolder.kilometer_num.setText(list.get(i).getMileage()); | ||
| 46 | + myViewHolder.tv_start_addr.setText(list.get(i).getStartLocation()); | ||
| 47 | + myViewHolder.tv_end_addr.setText(list.get(i).getEndLocation()); | ||
| 48 | +// myViewHolder.delect_path.setOnClickListener(v -> ); | ||
| 49 | + if(list.get(i).getIsEnable() == 0){ | ||
| 50 | + myViewHolder.has_path.setText("已绑定轨迹"); | ||
| 51 | + myViewHolder.has_path.setTextColor(context.getResources().getColor(R.color.text_gray99)); | ||
| 52 | + myViewHolder.has_path.setBackground(context.getResources().getDrawable(R.drawable.gray_raduis_bg)); | ||
| 53 | + }else { | ||
| 54 | + myViewHolder.has_path.setText("绑定轨迹"); | ||
| 55 | + myViewHolder.has_path.setTextColor(context.getResources().getColor(R.color.green_tx)); | ||
| 56 | + myViewHolder.has_path.setBackground(context.getResources().getDrawable(R.drawable.green_raduis_bg)); | ||
| 57 | + // myViewHolder.has_path.setOnClickListener(v -> ); | ||
| 58 | + } | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + @Override | ||
| 62 | + public int getItemCount() { | ||
| 63 | + return list.size(); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + class MyViewHolder extends RecyclerView.ViewHolder { | ||
| 67 | + | ||
| 68 | + TextView record_time_day; | ||
| 69 | + TextView record_time; | ||
| 70 | + ImageView item_img; | ||
| 71 | + TextView kilometer_num; | ||
| 72 | + TextView tv_start_addr; | ||
| 73 | + TextView tv_end_addr; | ||
| 74 | + TextView has_path; | ||
| 75 | + TextView delect_path; | ||
| 76 | + | ||
| 77 | + public MyViewHolder(@NonNull View itemView) { | ||
| 78 | + super(itemView); | ||
| 79 | + record_time_day = itemView.findViewById(R.id.record_time_day); | ||
| 80 | + record_time = itemView.findViewById(R.id.record_time); | ||
| 81 | + item_img = itemView.findViewById(R.id.item_img); | ||
| 82 | + kilometer_num = itemView.findViewById(R.id.kilometer_num); | ||
| 83 | + tv_start_addr = itemView.findViewById(R.id.tv_start_addr); | ||
| 84 | + tv_end_addr = itemView.findViewById(R.id.tv_end_addr); | ||
| 85 | + has_path = itemView.findViewById(R.id.has_path); | ||
| 86 | + delect_path = itemView.findViewById(R.id.delect_path); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | +} |
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; |
| @@ -41,6 +40,7 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo | @@ -41,6 +40,7 @@ public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHo | ||
| 41 | myViewHolder.line_name.setText(list.get(i).getTitle()); | 40 | 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")); | 41 | 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()); | 42 | myViewHolder.line_address.setText(list.get(i).getAddress() + " " + list.get(i).getMileage()); |
| 43 | + //添加轨迹 | ||
| 44 | // myViewHolder.add_path.setOnClickListener(v -> ); | 44 | // myViewHolder.add_path.setOnClickListener(v -> ); |
| 45 | // myViewHolder.path_list.setOnClickListener(v -> ); | 45 | // myViewHolder.path_list.setOnClickListener(v -> ); |
| 46 | } | 46 | } |
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.pedometer.commonInfo.CommonInfo; | ||
| 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 | + public RaceNameListFragment() { | ||
| 23 | + // Required empty public constructor | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + | ||
| 27 | + @Override | ||
| 28 | + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) { | ||
| 29 | + super.onViewCreated(view, savedInstanceState); | ||
| 30 | + if(getMvpView() != null) getMvpView().initView(); | ||
| 31 | + getPresenter().setData(getActivity(),"116",currentPage,pageSize); | ||
| 32 | + binding.refreshLayout.setOnRefreshListener(v ->{ | ||
| 33 | + currentPage = 1; | ||
| 34 | + getPresenter().setData(getActivity(),"116",currentPage,pageSize); | ||
| 35 | + }); | ||
| 36 | + binding.refreshLayout.setOnLoadMoreListener(v ->{ | ||
| 37 | + currentPage++; | ||
| 38 | + getPresenter().setData(getActivity(),"116",currentPage,pageSize); | ||
| 39 | + }); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + @Override | ||
| 43 | + protected int getLayoutId() { | ||
| 44 | + return R.layout.fragment_race_name_list; | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | +} |
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; |
| @@ -64,5 +65,11 @@ public interface ApiServiceRunLin { | @@ -64,5 +65,11 @@ public interface ApiServiceRunLin { | ||
| 64 | */ | 65 | */ |
| 65 | @POST("Daren/event/getRouteRecordList.action") | 66 | @POST("Daren/event/getRouteRecordList.action") |
| 66 | Observable<Result<BaseInfo<SelfRecordInfo>>> getSelfRecordInfo(@QueryMap() Map<String, String> maps); | 67 | Observable<Result<BaseInfo<SelfRecordInfo>>> getSelfRecordInfo(@QueryMap() Map<String, String> maps); |
| 68 | + | ||
| 69 | + /** | ||
| 70 | + * 踩点轨迹列表 | ||
| 71 | + */ | ||
| 72 | + @POST("Daren/event/getShoeLineList.action") | ||
| 73 | + Observable<Result<BaseInfo<RaceNameListInfo>>> getRaceNameListInfo(@QueryMap() Map<String, String> maps); | ||
| 67 | } | 74 | } |
| 68 | 75 |
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="18sp" | ||
| 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="14sp" | ||
| 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:background="@color/white" | ||
| 8 | + android:padding="10dp"> | ||
| 9 | + | ||
| 10 | + <LinearLayout | ||
| 11 | + android:layout_width="match_parent" | ||
| 12 | + android:layout_height="wrap_content" | ||
| 13 | + android:orientation="horizontal"> | ||
| 14 | + | ||
| 15 | + <TextView | ||
| 16 | + android:id="@+id/record_time_day" | ||
| 17 | + android:layout_width="wrap_content" | ||
| 18 | + android:layout_height="wrap_content" | ||
| 19 | + android:text="2017/05/01" | ||
| 20 | + android:textColor="#333333" | ||
| 21 | + android:textSize="14sp" /> | ||
| 22 | + | ||
| 23 | + <TextView | ||
| 24 | + android:id="@+id/record_time" | ||
| 25 | + android:layout_width="wrap_content" | ||
| 26 | + android:layout_height="wrap_content" | ||
| 27 | + android:layout_marginLeft="15dp" | ||
| 28 | + android:layout_toRightOf="@id/record_time_day" | ||
| 29 | + android:text="15:30" | ||
| 30 | + android:textColor="#999999" | ||
| 31 | + android:textSize="14sp" /> | ||
| 32 | + | ||
| 33 | + </LinearLayout> | ||
| 34 | + | ||
| 35 | + <View | ||
| 36 | + android:layout_width="match_parent" | ||
| 37 | + android:layout_height="1dp" | ||
| 38 | + android:layout_marginTop="5dp" | ||
| 39 | + android:background="#F4F4F4" /> | ||
| 40 | + | ||
| 41 | + <LinearLayout | ||
| 42 | + android:id="@+id/ry_re" | ||
| 43 | + android:layout_width="match_parent" | ||
| 44 | + android:layout_height="wrap_content" | ||
| 45 | + android:layout_marginTop="5dp" | ||
| 46 | + android:orientation="horizontal"> | ||
| 47 | + | ||
| 48 | + <ImageView | ||
| 49 | + android:id="@+id/item_img" | ||
| 50 | + android:layout_width="80dp" | ||
| 51 | + android:layout_height="80dp" | ||
| 52 | + android:src="@drawable/defaults" /> | ||
| 53 | + | ||
| 54 | + <LinearLayout | ||
| 55 | + android:layout_width="match_parent" | ||
| 56 | + android:layout_height="wrap_content" | ||
| 57 | + android:layout_marginLeft="15dp" | ||
| 58 | + android:orientation="vertical"> | ||
| 59 | + | ||
| 60 | + <TextView | ||
| 61 | + android:id="@+id/kilometer_num" | ||
| 62 | + android:layout_width="wrap_content" | ||
| 63 | + android:layout_height="wrap_content" | ||
| 64 | + android:text="4.42 公里" | ||
| 65 | + android:textColor="#333333" | ||
| 66 | + android:textSize="18sp" /> | ||
| 67 | + | ||
| 68 | + <LinearLayout | ||
| 69 | + android:layout_width="match_parent" | ||
| 70 | + android:layout_height="wrap_content" | ||
| 71 | + android:layout_marginTop="5dp"> | ||
| 72 | + | ||
| 73 | + <ImageView | ||
| 74 | + android:layout_width="10dp" | ||
| 75 | + android:layout_height="10dp" | ||
| 76 | + android:layout_gravity="center_vertical" | ||
| 77 | + android:background="@drawable/shape_circle_green" /> | ||
| 78 | + | ||
| 79 | + <TextView | ||
| 80 | + android:layout_width="wrap_content" | ||
| 81 | + android:layout_height="wrap_content" | ||
| 82 | + android:layout_marginLeft="5dp" | ||
| 83 | + android:text="@string/layout_street_start_point" | ||
| 84 | + android:textColor="@color/bottom_sheet_dialog_race_location_text" | ||
| 85 | + android:textSize="13sp" /> | ||
| 86 | + | ||
| 87 | + <TextView | ||
| 88 | + android:id="@+id/tv_start_addr" | ||
| 89 | + android:layout_width="wrap_content" | ||
| 90 | + android:layout_height="wrap_content" | ||
| 91 | + android:layout_marginLeft="10dp" | ||
| 92 | + android:text="首都师范大学操场东门" | ||
| 93 | + android:textColor="@color/text_black" | ||
| 94 | + android:textSize="13sp" /> | ||
| 95 | + </LinearLayout> | ||
| 96 | + | ||
| 97 | + <LinearLayout | ||
| 98 | + android:layout_width="match_parent" | ||
| 99 | + android:layout_height="wrap_content" | ||
| 100 | + android:layout_marginTop="5dp"> | ||
| 101 | + | ||
| 102 | + <ImageView | ||
| 103 | + android:layout_width="10dp" | ||
| 104 | + android:layout_height="10dp" | ||
| 105 | + android:layout_gravity="center_vertical" | ||
| 106 | + android:background="@drawable/shape_circle_red" /> | ||
| 107 | + | ||
| 108 | + <TextView | ||
| 109 | + android:layout_width="wrap_content" | ||
| 110 | + android:layout_height="wrap_content" | ||
| 111 | + android:layout_marginLeft="5dp" | ||
| 112 | + android:text="@string/layout_street_end_point" | ||
| 113 | + android:textColor="@color/bottom_sheet_dialog_race_location_text" | ||
| 114 | + android:textSize="13sp" /> | ||
| 115 | + | ||
| 116 | + <TextView | ||
| 117 | + android:id="@+id/tv_end_addr" | ||
| 118 | + android:layout_width="wrap_content" | ||
| 119 | + android:layout_height="wrap_content" | ||
| 120 | + android:layout_marginLeft="10dp" | ||
| 121 | + android:text="首都师范大学操场西门" | ||
| 122 | + android:textColor="@color/text_black" | ||
| 123 | + android:textSize="13sp" /> | ||
| 124 | + </LinearLayout> | ||
| 125 | + | ||
| 126 | + <LinearLayout | ||
| 127 | + android:layout_width="wrap_content" | ||
| 128 | + android:layout_height="wrap_content" | ||
| 129 | + android:layout_gravity="right" | ||
| 130 | + android:layout_marginTop="12dp" | ||
| 131 | + android:orientation="horizontal"> | ||
| 132 | + | ||
| 133 | + <TextView | ||
| 134 | + android:id="@+id/has_path" | ||
| 135 | + android:layout_width="wrap_content" | ||
| 136 | + android:layout_height="wrap_content" | ||
| 137 | + android:background="@drawable/green_raduis_bg" | ||
| 138 | + android:paddingLeft="10dp" | ||
| 139 | + android:paddingTop="7dp" | ||
| 140 | + android:paddingRight="10dp" | ||
| 141 | + android:paddingBottom="7dp" | ||
| 142 | + android:text="@string/addpath" | ||
| 143 | + android:textColor="@color/green_tx" | ||
| 144 | + android:textSize="12sp" /> | ||
| 145 | + | ||
| 146 | + <TextView | ||
| 147 | + android:id="@+id/delect_path" | ||
| 148 | + android:layout_width="wrap_content" | ||
| 149 | + android:layout_height="wrap_content" | ||
| 150 | + android:layout_marginLeft="15dp" | ||
| 151 | + android:background="@drawable/green_raduis_bg" | ||
| 152 | + android:paddingLeft="9dp" | ||
| 153 | + android:paddingTop="7dp" | ||
| 154 | + android:paddingRight="9dp" | ||
| 155 | + android:paddingBottom="7dp" | ||
| 156 | + android:text="@string/delect" | ||
| 157 | + android:textColor="#36C28D" | ||
| 158 | + android:textSize="12sp" /> | ||
| 159 | + </LinearLayout> | ||
| 160 | + | ||
| 161 | + </LinearLayout> | ||
| 162 | + </LinearLayout> | ||
| 163 | +</LinearLayout> | ||
| 0 | \ No newline at end of file | 164 | \ 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
| @@ -84,6 +84,9 @@ | @@ -84,6 +84,9 @@ | ||
| 84 | <string name="enter_range_tip">您已回归轨迹 继续参与运动吧</string> | 84 | <string name="enter_range_tip">您已回归轨迹 继续参与运动吧</string> |
| 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="add_path">添加轨迹</string> | ||
| 88 | + <string name="addpath">绑定轨迹</string> | ||
| 89 | + <string name="delect">删除</string> | ||
| 87 | 90 | ||
| 88 | 91 | ||
| 89 | </resources> | 92 | </resources> |