Commit 0c5306b6db2f26b93f77935b94e6281dcf70450d

Authored by 韩亚云
1 parent 4614a359

赛事列表

.idea/gradle.xml
@@ -3,6 +3,9 @@ @@ -3,6 +3,9 @@
3 <component name="GradleSettings"> 3 <component name="GradleSettings">
4 <option name="linkedExternalProjectsSettings"> 4 <option name="linkedExternalProjectsSettings">
5 <GradleProjectSettings> 5 <GradleProjectSettings>
  6 + <compositeConfiguration>
  7 + <compositeBuild compositeDefinitionSource="SCRIPT" />
  8 + </compositeConfiguration>
6 <option name="distributionType" value="DEFAULT_WRAPPED" /> 9 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 <option name="externalProjectPath" value="$PROJECT_DIR$" /> 10 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 <option name="modules"> 11 <option name="modules">
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/presenter/RaceListPresenter.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.RaceListView;
  10 +import com.cnlive.moudle.pedometer.net.ApiServiceRunLin;
  11 +import com.cnlive.moudle.pedometer.net.SubscriptionRequest;
  12 +import com.cnlive.moudle.pedometer.net.bean.BaseInfo;
  13 +import com.cnlive.moudle.pedometer.net.bean.RunLineInfo;
  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/24.
  23 + */
  24 +public class RaceListPresenter extends MvpBasePresenter<RaceListView> {
  25 +
  26 + public void setData(Context context, String sid, int pageNo, int pageSize){
  27 + HashMap<String, String> map = new HashMap<>();
  28 + map.put("sid", sid);
  29 + map.put("pageNo", pageNo+"");
  30 + map.put("state","1");
  31 + map.put("pageSize", pageSize+"");
  32 + getView().showLoading();
  33 + Logic.create(map).action(new Logic.Action<Map<String, String>, BaseInfo<RunLineInfo>>() {
  34 + @Override
  35 + public Disposable action(Map<String, String> stringStringMap, DataCallback<BaseInfo<RunLineInfo>> dataCallback) {
  36 + return SubscriptionRequest.service(ApiServiceRunLin.class, api -> api.getRunLineListInfo(stringStringMap)).subscribe(context, dataCallback);
  37 + }
  38 + }).<BaseInfo<RunLineInfo>>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<RunLineInfo>>() {
  47 + @Override
  48 + public void onSuccess(BaseInfo<RunLineInfo> registerInfo) {
  49 + if (getView() != null){
  50 + getView().onSuccess(registerInfo);
  51 + }
  52 + }
  53 + }).start();
  54 + }
  55 +}
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/frame/view/RaceListView.java 0 → 100644
  1 +package com.cnlive.moudle.collectionTrace.frame.view;
  2 +
  3 +import android.view.View;
  4 +
  5 +import com.cnlive.libs.base.util.AlertUtil;
  6 +import com.cnlive.moudle.collectionTrace.ui.adapter.RunListAdapter;
  7 +import com.cnlive.moudle.collectionTrace.ui.fragment.RaceListFragment;
  8 +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
  9 +import com.cnlive.moudle.pedometer.net.bean.BaseInfo;
  10 +import com.cnlive.moudle.pedometer.net.bean.RunLineInfo;
  11 +import com.example.moudle_pedometer.R;
  12 +import com.hannesdorfmann.mosby3.mvp.MvpView;
  13 +import com.qmuiteam.qmui.widget.dialog.QMUITipDialog;
  14 +import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
  15 +import com.scwang.smartrefresh.layout.header.ClassicsHeader;
  16 +
  17 +import java.util.ArrayList;
  18 +import java.util.List;
  19 +
  20 +/**
  21 + * Created by hanyayun 019/06/24.
  22 + */
  23 +public class RaceListView implements MvpView {
  24 +
  25 + private RaceListFragment fragment;
  26 + public QMUITipDialog loadingDiaog;
  27 + private List<RunLineInfo.ListBean> list = new ArrayList<>();
  28 + private RunListAdapter adapter;
  29 +
  30 + public RaceListView(RaceListFragment 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 + public void initView(){
  39 + fragment.binding.topbar.addLeftImageButton(R.drawable.top_back_black, R.id.fragment_back).setOnClickListener(v -> {
  40 + fragment.getActivity().finish();
  41 + });
  42 + fragment.binding.topbar.setTitle("赛事列表");
  43 + fragment.binding.refreshLayout.setRefreshHeader(new ClassicsHeader(fragment.getActivity()));
  44 + fragment.binding.refreshLayout.setRefreshFooter(new ClassicsFooter(fragment.getActivity()));
  45 + }
  46 +
  47 + public void onSuccess(BaseInfo<RunLineInfo> runLineInfoBaseInfo){
  48 + hideLoading();
  49 + if(fragment.currentPage == 1){
  50 + list.clear();
  51 + list.addAll(runLineInfoBaseInfo.getData().getList());
  52 + if(adapter == null){
  53 + adapter = new RunListAdapter(list,fragment.getActivity());
  54 + fragment.binding.raceRecy.setAdapter(adapter);
  55 +// adapter.setClickListener(new RunLineAdapter.OnClickListener() {
  56 +// @Override
  57 +// public void onClickListener(RunLineInfo.ListBean bean, int position) {
  58 +// RunRaceDetailActivity.startActivity(fragment.getActivity(),bean.getId()+"",null,null,null,null);
  59 +// }
  60 +// });
  61 + }else {
  62 + adapter.notifyDataSetChanged();
  63 + }
  64 + }
  65 +
  66 + if(list.size() != 0){
  67 + fragment.binding.empty.setVisibility(View.GONE);
  68 + fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
  69 + }else {
  70 + showEmpty();
  71 + }
  72 +
  73 + if(runLineInfoBaseInfo.getData().getList().size() < fragment.pageSize){
  74 + fragment.binding.refreshLayout.setEnableLoadMore(false);
  75 + }else {
  76 + fragment.binding.refreshLayout.setEnableLoadMore(true);
  77 + }
  78 + if(fragment.currentPage > 1){
  79 + list.addAll(runLineInfoBaseInfo.getData().getList());
  80 + adapter.notifyDataSetChanged();
  81 + }
  82 + fragment.binding.refreshLayout.finishRefresh();
  83 + fragment.binding.refreshLayout.finishLoadMore();
  84 + }
  85 +
  86 + public void showErr(String msg){
  87 + fragment.binding.refreshLayout.finishRefresh();
  88 + fragment.binding.refreshLayout.finishLoadMore();
  89 + if (list.size() == 0) {
  90 + fragment.binding.empty.setVisibility(View.VISIBLE);
  91 + fragment.binding.refreshLayout.setVisibility(View.GONE);
  92 + fragment.binding.empty.setDetailText(fragment.getResources().getString(R.string.msg_failed_network_detail));
  93 + fragment.binding.empty.setTitleText(msg);
  94 + fragment.binding.empty.setButton("重试", new View.OnClickListener() {
  95 + @Override
  96 + public void onClick(View v) {
  97 + fragment.currentPage = 1;
  98 + fragment.getPresenter().setData(fragment.getActivity(), CommonInfo.getUserId(fragment.getActivity()),fragment.currentPage,fragment.pageSize);
  99 + }
  100 + });
  101 + fragment.binding.empty.setLoadingShowing(false);
  102 + fragment.binding.empty.setImage(R.drawable.wufalianjie);
  103 + } else {
  104 + fragment.binding.empty.setVisibility(View.GONE);
  105 + fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
  106 + showToast(msg);
  107 + }
  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 +
  130 +}
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/activity/RaceListActivity.java
@@ -3,9 +3,14 @@ package com.cnlive.moudle.collectionTrace.ui.activity; @@ -3,9 +3,14 @@ package com.cnlive.moudle.collectionTrace.ui.activity;
3 import android.support.v7.app.AppCompatActivity; 3 import android.support.v7.app.AppCompatActivity;
4 import android.os.Bundle; 4 import android.os.Bundle;
5 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.RaceListFragment;
  9 +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
6 import com.example.moudle_pedometer.R; 10 import com.example.moudle_pedometer.R;
7 11
8 /** 12 /**
  13 + * 赛事列表
9 * Created by hanyayun 019/06/24. 14 * Created by hanyayun 019/06/24.
10 */ 15 */
11 public class RaceListActivity extends AppCompatActivity { 16 public class RaceListActivity extends AppCompatActivity {
@@ -13,6 +18,10 @@ public class RaceListActivity extends AppCompatActivity { @@ -13,6 +18,10 @@ public class RaceListActivity extends AppCompatActivity {
13 @Override 18 @Override
14 protected void onCreate(Bundle savedInstanceState) { 19 protected void onCreate(Bundle savedInstanceState) {
15 super.onCreate(savedInstanceState); 20 super.onCreate(savedInstanceState);
  21 + StatusBarUtil.setStatusBarWrite(this);
  22 + StatusBarUtil2.setColor(this, getResources().getColor(R.color.white), 0);
16 setContentView(R.layout.activity_race_list); 23 setContentView(R.layout.activity_race_list);
  24 + CommonInfo.setUserId(this, "10513196");
  25 + getSupportFragmentManager().beginTransaction().replace(R.id.race_container,new RaceListFragment()).commit();
17 } 26 }
18 } 27 }
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/adapter/RunListAdapter.java 0 → 100644
  1 +package com.cnlive.moudle.collectionTrace.ui.adapter;
  2 +
  3 +import android.app.Activity;
  4 +import android.content.Context;
  5 +import android.support.annotation.NonNull;
  6 +import android.support.v7.widget.RecyclerView;
  7 +import android.view.LayoutInflater;
  8 +import android.view.View;
  9 +import android.view.ViewGroup;
  10 +import android.widget.TextView;
  11 +
  12 +import com.cnlive.moudle.pedometer.net.bean.RunLineInfo;
  13 +import com.cnlive.moudle.pedometer.utils.TimeUtil;
  14 +import com.example.moudle_pedometer.R;
  15 +
  16 +import java.util.ArrayList;
  17 +import java.util.List;
  18 +
  19 +/**
  20 + * Created by hanyayun 019/06/24.
  21 + */
  22 +public class RunListAdapter extends RecyclerView.Adapter<RunListAdapter.MyViewHolder> {
  23 +
  24 + private List<RunLineInfo.ListBean> list = new ArrayList<>();
  25 + private Activity context;
  26 +
  27 + public RunListAdapter(List<RunLineInfo.ListBean> list, Activity context) {
  28 + this.list = list;
  29 + this.context = context;
  30 + }
  31 +
  32 + @NonNull
  33 + @Override
  34 + public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {
  35 + View view = LayoutInflater.from(context).inflate(R.layout.item_record, viewGroup, false);
  36 + return new MyViewHolder(view);
  37 + }
  38 +
  39 + @Override
  40 + public void onBindViewHolder(@NonNull MyViewHolder myViewHolder, int i) {
  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"));
  43 + myViewHolder.line_address.setText(list.get(i).getAddress() + " " + list.get(i).getMileage());
  44 +// myViewHolder.add_path.setOnClickListener(v -> );
  45 +// myViewHolder.path_list.setOnClickListener(v -> );
  46 + }
  47 +
  48 + @Override
  49 + public int getItemCount() {
  50 + return list.size();
  51 + }
  52 +
  53 + class MyViewHolder extends RecyclerView.ViewHolder{
  54 +
  55 + TextView line_name;
  56 + TextView activity_time;
  57 + TextView line_address;
  58 + TextView add_path;
  59 + TextView path_list;
  60 +
  61 + public MyViewHolder(@NonNull View itemView) {
  62 + super(itemView);
  63 + line_name = itemView.findViewById(R.id.line_name);
  64 + activity_time = itemView.findViewById(R.id.activity_time);
  65 + line_address = itemView.findViewById(R.id.line_address);
  66 + add_path = itemView.findViewById(R.id.add_path);
  67 + path_list = itemView.findViewById(R.id.path_list);
  68 + }
  69 + }
  70 +}
moudle_pedometer/src/main/java/com/cnlive/moudle/collectionTrace/ui/fragment/RaceListFragment.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.RaceListPresenter;
  10 +import com.cnlive.moudle.collectionTrace.frame.view.RaceListView;
  11 +import com.cnlive.moudle.pedometer.commonInfo.CommonInfo;
  12 +import com.example.moudle_pedometer.R;
  13 +import com.example.moudle_pedometer.databinding.FragmentRaceListBinding;
  14 +
  15 +/**
  16 + * Created by hanyayun 019/06/24.
  17 + */
  18 +public class RaceListFragment extends MvpBindingFragment<RaceListView, RaceListPresenter,Object, FragmentRaceListBinding> {
  19 +
  20 + public int currentPage = 1;
  21 + public int pageSize = 10;
  22 +
  23 + public RaceListFragment() {
  24 +
  25 + }
  26 +
  27 +
  28 + @Override
  29 + public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
  30 + super.onViewCreated(view, savedInstanceState);
  31 + if(getMvpView() != null)getMvpView().initView();
  32 + getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()),currentPage,pageSize);
  33 + binding.refreshLayout.setOnRefreshListener(v ->{
  34 + currentPage = 1;
  35 + getPresenter().setData(getActivity(), CommonInfo.getUserId(getActivity()),currentPage,pageSize);
  36 + });
  37 + binding.refreshLayout.setOnLoadMoreListener(v ->{
  38 + currentPage++;
  39 + getPresenter().setData(getActivity(),CommonInfo.getUserId(getActivity()),currentPage,pageSize);
  40 + });
  41 + }
  42 +
  43 + @Override
  44 + protected int getLayoutId() {
  45 + return R.layout.fragment_race_list;
  46 + }
  47 +
  48 +}
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoMaster.java
@@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster { @@ -21,14 +21,14 @@ public class DaoMaster extends AbstractDaoMaster {
21 21
22 /** Creates underlying database table using DAOs. */ 22 /** Creates underlying database table using DAOs. */
23 public static void createAllTables(Database db, boolean ifNotExists) { 23 public static void createAllTables(Database db, boolean ifNotExists) {
24 - CollUserStepEntityDao.createTable(db, ifNotExists);  
25 UserStepEntityDao.createTable(db, ifNotExists); 24 UserStepEntityDao.createTable(db, ifNotExists);
  25 + CollUserStepEntityDao.createTable(db, ifNotExists);
26 } 26 }
27 27
28 /** Drops underlying database table using DAOs. */ 28 /** Drops underlying database table using DAOs. */
29 public static void dropAllTables(Database db, boolean ifExists) { 29 public static void dropAllTables(Database db, boolean ifExists) {
30 - CollUserStepEntityDao.dropTable(db, ifExists);  
31 UserStepEntityDao.dropTable(db, ifExists); 30 UserStepEntityDao.dropTable(db, ifExists);
  31 + CollUserStepEntityDao.dropTable(db, ifExists);
32 } 32 }
33 33
34 /** 34 /**
@@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster { @@ -47,8 +47,8 @@ public class DaoMaster extends AbstractDaoMaster {
47 47
48 public DaoMaster(Database db) { 48 public DaoMaster(Database db) {
49 super(db, SCHEMA_VERSION); 49 super(db, SCHEMA_VERSION);
50 - registerDaoClass(CollUserStepEntityDao.class);  
51 registerDaoClass(UserStepEntityDao.class); 50 registerDaoClass(UserStepEntityDao.class);
  51 + registerDaoClass(CollUserStepEntityDao.class);
52 } 52 }
53 53
54 public DaoSession newSession() { 54 public DaoSession newSession() {
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/sql/dao/DaoSession.java
@@ -8,11 +8,11 @@ import org.greenrobot.greendao.database.Database; @@ -8,11 +8,11 @@ import org.greenrobot.greendao.database.Database;
8 import org.greenrobot.greendao.identityscope.IdentityScopeType; 8 import org.greenrobot.greendao.identityscope.IdentityScopeType;
9 import org.greenrobot.greendao.internal.DaoConfig; 9 import org.greenrobot.greendao.internal.DaoConfig;
10 10
11 -import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity;  
12 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity; 11 import com.cnlive.moudle.pedometer.sql.entity.UserStepEntity;
  12 +import com.cnlive.moudle.pedometer.sql.entity.CollUserStepEntity;
13 13
14 -import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao;  
15 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; 14 import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
  15 +import com.cnlive.moudle.pedometer.sql.dao.CollUserStepEntityDao;
16 16
17 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. 17 // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
18 18
@@ -23,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao; @@ -23,40 +23,40 @@ import com.cnlive.moudle.pedometer.sql.dao.UserStepEntityDao;
23 */ 23 */
24 public class DaoSession extends AbstractDaoSession { 24 public class DaoSession extends AbstractDaoSession {
25 25
26 - private final DaoConfig collUserStepEntityDaoConfig;  
27 private final DaoConfig userStepEntityDaoConfig; 26 private final DaoConfig userStepEntityDaoConfig;
  27 + private final DaoConfig collUserStepEntityDaoConfig;
28 28
29 - private final CollUserStepEntityDao collUserStepEntityDao;  
30 private final UserStepEntityDao userStepEntityDao; 29 private final UserStepEntityDao userStepEntityDao;
  30 + private final CollUserStepEntityDao collUserStepEntityDao;
31 31
32 public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> 32 public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
33 daoConfigMap) { 33 daoConfigMap) {
34 super(db); 34 super(db);
35 35
36 - collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone();  
37 - collUserStepEntityDaoConfig.initIdentityScope(type);  
38 -  
39 userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone(); 36 userStepEntityDaoConfig = daoConfigMap.get(UserStepEntityDao.class).clone();
40 userStepEntityDaoConfig.initIdentityScope(type); 37 userStepEntityDaoConfig.initIdentityScope(type);
41 38
42 - collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this); 39 + collUserStepEntityDaoConfig = daoConfigMap.get(CollUserStepEntityDao.class).clone();
  40 + collUserStepEntityDaoConfig.initIdentityScope(type);
  41 +
43 userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this); 42 userStepEntityDao = new UserStepEntityDao(userStepEntityDaoConfig, this);
  43 + collUserStepEntityDao = new CollUserStepEntityDao(collUserStepEntityDaoConfig, this);
44 44
45 - registerDao(CollUserStepEntity.class, collUserStepEntityDao);  
46 registerDao(UserStepEntity.class, userStepEntityDao); 45 registerDao(UserStepEntity.class, userStepEntityDao);
  46 + registerDao(CollUserStepEntity.class, collUserStepEntityDao);
47 } 47 }
48 48
49 public void clear() { 49 public void clear() {
50 - collUserStepEntityDaoConfig.clearIdentityScope();  
51 userStepEntityDaoConfig.clearIdentityScope(); 50 userStepEntityDaoConfig.clearIdentityScope();
52 - }  
53 -  
54 - public CollUserStepEntityDao getCollUserStepEntityDao() {  
55 - return collUserStepEntityDao; 51 + collUserStepEntityDaoConfig.clearIdentityScope();
56 } 52 }
57 53
58 public UserStepEntityDao getUserStepEntityDao() { 54 public UserStepEntityDao getUserStepEntityDao() {
59 return userStepEntityDao; 55 return userStepEntityDao;
60 } 56 }
61 57
  58 + public CollUserStepEntityDao getCollUserStepEntityDao() {
  59 + return collUserStepEntityDao;
  60 + }
  61 +
62 } 62 }
moudle_pedometer/src/main/res/layout/fragment_race_list.xml 0 → 100644
  1 +<layout xmlns:android="http://schemas.android.com/apk/res/android">
  2 +
  3 + <LinearLayout
  4 + android:layout_width="match_parent"
  5 + android:layout_height="match_parent"
  6 + android:background="#F8F8F8"
  7 + android:orientation="vertical">
  8 +
  9 + <com.qmuiteam.qmui.widget.QMUITopBar
  10 + android:id="@+id/topbar"
  11 + android:layout_width="match_parent"
  12 + android:layout_height="?attr/qmui_topbar_height" />
  13 +
  14 + <com.scwang.smartrefresh.layout.SmartRefreshLayout
  15 + android:id="@+id/refreshLayout"
  16 + android:layout_width="match_parent"
  17 + android:layout_height="match_parent">
  18 +
  19 + <android.support.v7.widget.RecyclerView
  20 + android:id="@+id/race_recy"
  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" />
  26 + </com.scwang.smartrefresh.layout.SmartRefreshLayout>
  27 +
  28 +
  29 + <com.cnlive.strike.ui.widget.UIEmptyView
  30 + android:id="@+id/empty"
  31 + android:layout_width="match_parent"
  32 + android:layout_height="match_parent"
  33 + android:visibility="gone" />
  34 + </LinearLayout>
  35 +</layout>
  36 +
moudle_pedometer/src/main/res/layout/item_record.xml 0 → 100644
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3 + android:id="@+id/item_ly"
  4 + android:layout_width="match_parent"
  5 + android:layout_height="wrap_content"
  6 + android:layout_margin="10dp"
  7 + android:background="@color/white"
  8 + android:orientation="vertical">
  9 +
  10 + <LinearLayout
  11 + android:layout_width="match_parent"
  12 + android:layout_height="wrap_content"
  13 + android:orientation="vertical"
  14 + android:padding="10dp">
  15 +
  16 + <TextView
  17 + android:id="@+id/line_name"
  18 + android:layout_width="wrap_content"
  19 + android:layout_height="wrap_content"
  20 + android:textColor="#333333"
  21 + android:textSize="18sp" />
  22 +
  23 + <LinearLayout
  24 + android:layout_width="match_parent"
  25 + android:layout_height="wrap_content"
  26 + android:layout_marginTop="10dp">
  27 +
  28 + <TextView
  29 + android:layout_width="wrap_content"
  30 + android:layout_height="wrap_content"
  31 + android:drawableLeft="@drawable/sport_time"
  32 + android:drawablePadding="5dp"
  33 + android:text="@string/record_time"
  34 + android:textColor="#999999"
  35 + android:textSize="12sp" />
  36 +
  37 + <TextView
  38 + android:id="@+id/activity_time"
  39 + android:layout_width="wrap_content"
  40 + android:layout_height="wrap_content"
  41 + android:layout_marginLeft="10dp"
  42 + android:textColor="#999999"
  43 + android:textSize="12sp" />
  44 + </LinearLayout>
  45 +
  46 + <LinearLayout
  47 + android:layout_width="match_parent"
  48 + android:layout_height="wrap_content"
  49 + android:layout_marginTop="10dp">
  50 +
  51 + <TextView
  52 + android:layout_width="wrap_content"
  53 + android:layout_height="wrap_content"
  54 + android:drawableLeft="@drawable/sport_location"
  55 + android:drawablePadding="5dp"
  56 + android:text="@string/record_place"
  57 + android:textColor="#999999"
  58 + android:textSize="12sp" />
  59 +
  60 + <TextView
  61 + android:id="@+id/line_address"
  62 + android:layout_width="wrap_content"
  63 + android:layout_height="wrap_content"
  64 + android:layout_marginLeft="10dp"
  65 + android:textColor="#999999"
  66 + android:textSize="12sp" />
  67 + </LinearLayout>
  68 +
  69 + <RelativeLayout
  70 + android:layout_width="wrap_content"
  71 + android:layout_height="wrap_content"
  72 + android:layout_marginTop="10dp">
  73 +
  74 + <TextView
  75 + android:id="@+id/path_list"
  76 + android:layout_width="wrap_content"
  77 + android:layout_height="wrap_content"
  78 + android:layout_alignParentRight="true"
  79 + android:background="@drawable/green_raduis_bg"
  80 + android:paddingLeft="10dp"
  81 + android:paddingTop="7dp"
  82 + android:paddingRight="10dp"
  83 + android:paddingBottom="7dp"
  84 + android:text="轨迹列表"
  85 + android:textColor="#36C28D"
  86 + android:textSize="12sp" />
  87 +
  88 + <TextView
  89 + android:id="@+id/add_path"
  90 + android:layout_width="wrap_content"
  91 + android:layout_height="wrap_content"
  92 + android:layout_marginRight="10dp"
  93 + android:layout_toLeftOf="@id/path_list"
  94 + android:background="@drawable/green_raduis_bg"
  95 + android:paddingLeft="10dp"
  96 + android:paddingTop="7dp"
  97 + android:paddingRight="10dp"
  98 + android:paddingBottom="7dp"
  99 + android:text="添加轨迹"
  100 + android:textColor="#36C28D"
  101 + android:textSize="12sp" />
  102 +
  103 + </RelativeLayout>
  104 +
  105 + </LinearLayout>
  106 +
  107 +</RelativeLayout>
0 \ No newline at end of file 108 \ No newline at end of file
moudle_pedometer/src/main/res/values/strings.xml
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <string name="foot">步</string> 22 <string name="foot">步</string>
23 <string name="all_line_record">该路线全部成绩</string> 23 <string name="all_line_record">该路线全部成绩</string>
24 <string name="record_time">活动时间:</string> 24 <string name="record_time">活动时间:</string>
25 - <string name="record_place">活动地点</string> 25 + <string name="record_place">活动地点:</string>
26 26
27 <!-- TODO: Remove or change this placeholder text --> 27 <!-- TODO: Remove or change this placeholder text -->
28 <string name="hello_blank_fragment">Hello blank fragment</string> 28 <string name="hello_blank_fragment">Hello blank fragment</string>