Commit ee009e23141f6830a94d3b70e9a6aac23d30864e

Authored by 杨帅
2 parents ddc68405 ac37058e
.idea/gradle.xml
... ... @@ -3,6 +3,9 @@
3 3 <component name="GradleSettings">
4 4 <option name="linkedExternalProjectsSettings">
5 5 <GradleProjectSettings>
  6 + <compositeConfiguration>
  7 + <compositeBuild compositeDefinitionSource="SCRIPT" />
  8 + </compositeConfiguration>
6 9 <option name="distributionType" value="DEFAULT_WRAPPED" />
7 10 <option name="externalProjectPath" value="$PROJECT_DIR$" />
8 11 <option name="modules">
... ...
config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "0.2.2",
  24 + version: "0.2.3",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.module",
27 27 //Lib库名称
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/MyRecordView.java
... ... @@ -58,6 +58,7 @@ public class MyRecordView implements MvpView {
58 58  
59 59 if(list.size() != 0){
60 60 fragment.binding.empty.setVisibility(View.GONE);
  61 + fragment.binding.emptyRy.setVisibility(View.GONE);
61 62 fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
62 63 }else {
63 64 showEmpty();
... ... @@ -87,6 +88,7 @@ public class MyRecordView implements MvpView {
87 88 fragment.binding.refreshLayout.finishLoadMore();
88 89 if (list.size() == 0) {
89 90 fragment.binding.empty.setVisibility(View.VISIBLE);
  91 + fragment.binding.emptyRy.setVisibility(View.GONE);
90 92 fragment.binding.refreshLayout.setVisibility(View.GONE);
91 93 fragment.binding.empty.setDetailText(fragment.getResources().getString(R.string.msg_failed_network_detail));
92 94 fragment.binding.empty.setTitleText(msg);
... ... @@ -101,6 +103,7 @@ public class MyRecordView implements MvpView {
101 103 fragment.binding.empty.setImage(R.drawable.wufalianjie);
102 104 } else {
103 105 fragment.binding.empty.setVisibility(View.GONE);
  106 + fragment.binding.emptyRy.setVisibility(View.GONE);
104 107 fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
105 108 showToast(msg);
106 109 }
... ... @@ -112,9 +115,9 @@ public class MyRecordView implements MvpView {
112 115 }
113 116  
114 117 public void showEmpty(){
115   - fragment.binding.empty.setVisibility(View.VISIBLE);
  118 + fragment.binding.empty.setVisibility(View.GONE);
116 119 fragment.binding.refreshLayout.setVisibility(View.GONE);
117   - fragment.binding.empty.show("没有相关活动", "", R.drawable.bmcg_no);
  120 + fragment.binding.emptyRy.setVisibility(View.VISIBLE);
118 121 }
119 122  
120 123  
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RaceRecorView.java
... ... @@ -127,6 +127,7 @@ public class RaceRecorView implements MvpView {
127 127  
128 128 if (list.size() != 0) {
129 129 fragment.binding.emptyNet.setVisibility(View.GONE);
  130 + fragment.binding.emptyRy.setVisibility(View.GONE);
130 131 fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
131 132 } else {
132 133 showEmpty();
... ... @@ -147,12 +148,12 @@ public class RaceRecorView implements MvpView {
147 148  
148 149 public void showEmpty() {
149 150 fragment.binding.refreshLayout.setVisibility(View.GONE);
150   - fragment.binding.emptyNet.setVisibility(View.VISIBLE);
151 151 fragment.binding.kilometerNum.setText("0.00");
152 152 fragment.binding.stepNum.setText("--");
153 153 fragment.binding.kilometerTime.setText("00:00:00");
154 154 fragment.binding.kilometerSpeed.setText("--");
155   - fragment.binding.emptyNet.show("你还没有该线路的成绩", "", R.drawable.bmcg_has);
  155 + fragment.binding.emptyRy.setVisibility(View.VISIBLE);
  156 + fragment.binding.emptyNet.setVisibility(View.GONE);
156 157 }
157 158  
158 159 public void showError(String msg) {
... ... @@ -162,6 +163,7 @@ public class RaceRecorView implements MvpView {
162 163 fragment.binding.refreshLayout.setVisibility(View.GONE);
163 164 fragment.binding.ryRecord.setVisibility(View.GONE);
164 165 fragment.binding.txAll.setVisibility(View.GONE);
  166 + fragment.binding.emptyRy.setVisibility(View.GONE);
165 167 fragment.binding.emptyNet.setVisibility(View.VISIBLE);
166 168 fragment.binding.emptyNet.setDetailText(fragment.getResources().getString(R.string.msg_failed_network_detail));
167 169 fragment.binding.emptyNet.setTitleText(msg);
... ... @@ -176,6 +178,7 @@ public class RaceRecorView implements MvpView {
176 178 fragment.binding.emptyNet.setImage(R.drawable.wufalianjie);
177 179 } else {
178 180 fragment.binding.emptyNet.setVisibility(View.GONE);
  181 + fragment.binding.emptyRy.setVisibility(View.GONE);
179 182 fragment.binding.refreshLayout.setVisibility(View.VISIBLE);
180 183 fragment.binding.ryRecord.setVisibility(View.VISIBLE);
181 184 fragment.binding.txAll.setVisibility(View.VISIBLE);
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
... ... @@ -643,7 +643,7 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener {
643 643 @Override
644 644 public void onClick(View view) {
645 645 ARouter.getInstance().build("/web/WebViewColorActivity")
646   - .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html")
  646 + .withString("url", "http://wjjh5test.cnlive.com/cnSportList.html"+"?sid="+CommonInfo.getUserId(fragment.getActivity())+"&eventId="+CommonInfo.getStreetId(fragment.getActivity()))
647 647 .withString("title", "排行榜")
648 648 .navigation(fragment.getActivity());
649 649 }
... ...
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/MyRecordAdapter.java
... ... @@ -57,7 +57,7 @@ public class MyRecordAdapter extends RecyclerView.Adapter&lt;MyRecordAdapter.MyView
57 57 myViewHolder.my_record.setOnClickListener(v -> startAc(list.get(i)));
58 58 myViewHolder.check_raking.setOnClickListener(v ->
59 59 ARouter.getInstance().build("/web/WebViewColorActivity")
60   - .withString("url", "http://wjjh5test.cnlive.com/cnSportListOver.html")
  60 + .withString("url", "http://wjjh5test.cnlive.com/cnSportListOver.html"+"?sid="+CommonInfo.getUserId(context)+"&eventId="+list.get(i).getId())
61 61 .withString("title","总排行榜")
62 62 .navigation(context));
63 63 if (clickListener != null) {
... ...
moudle_pedometer/src/main/res/drawable-hdpi/background.png 0 → 100644

3.67 KB

moudle_pedometer/src/main/res/drawable-xhdpi/background.png 0 → 100644

5.44 KB

moudle_pedometer/src/main/res/drawable-xxhdpi/background.png 0 → 100644

11.2 KB

moudle_pedometer/src/main/res/layout/activity_my_record.xml
... ... @@ -27,8 +27,7 @@
27 27 <android.support.v4.view.ViewPager
28 28 android:id="@+id/viewpager"
29 29 android:layout_width="match_parent"
30   - android:layout_height="match_parent"
31   - android:background="#F7F4F4"/>
  30 + android:layout_height="match_parent"/>
32 31  
33 32  
34 33 </LinearLayout>
... ...
moudle_pedometer/src/main/res/layout/fragment_my_record.xml
... ... @@ -8,7 +8,8 @@
8 8 <com.scwang.smartrefresh.layout.SmartRefreshLayout
9 9 android:id="@+id/refreshLayout"
10 10 android:layout_width="match_parent"
11   - android:layout_height="match_parent">
  11 + android:layout_height="match_parent"
  12 + android:background="#F4F4F4">
12 13  
13 14 <android.support.v7.widget.RecyclerView
14 15 android:id="@+id/my_record_recy"
... ... @@ -16,10 +17,41 @@
16 17 android:layout_height="match_parent" />
17 18 </com.scwang.smartrefresh.layout.SmartRefreshLayout>
18 19  
  20 + <RelativeLayout
  21 + android:id="@+id/empty_ry"
  22 + android:layout_width="match_parent"
  23 + android:layout_height="match_parent"
  24 + android:background="#F4F4F4"
  25 + android:visibility="gone">
  26 +
  27 + <LinearLayout
  28 + android:layout_width="wrap_content"
  29 + android:layout_height="wrap_content"
  30 + android:layout_centerInParent="true"
  31 + android:orientation="vertical">
  32 + <ImageView
  33 + android:layout_width="wrap_content"
  34 + android:layout_height="wrap_content"
  35 + android:src="@drawable/bmcg_no"
  36 + />
  37 + <TextView
  38 + android:layout_width="wrap_content"
  39 + android:layout_height="wrap_content"
  40 + android:text="没有相关活动"
  41 + android:layout_marginTop="15dp"
  42 + android:textSize="15sp"
  43 + android:textColor="#333333"
  44 + android:layout_gravity="center"
  45 + />
  46 + </LinearLayout>
  47 +
  48 + </RelativeLayout>
  49 +
19 50 <com.cnlive.strike.ui.widget.UIEmptyView
20 51 android:id="@+id/empty"
21 52 android:layout_width="match_parent"
22 53 android:layout_height="match_parent"
  54 + android:background="#F4F4F4"
23 55 android:visibility="gone" />
24 56 </RelativeLayout>
25 57 </layout>
26 58 \ No newline at end of file
... ...
moudle_pedometer/src/main/res/layout/fragment_race_recor.xml
... ... @@ -16,84 +16,92 @@
16 16 android:layout_width="match_parent"
17 17 android:layout_height="wrap_content"
18 18 android:layout_marginTop="10dp"
19   - android:background="@drawable/wdjl_backgroud"
20   - android:padding="25dp">
  19 + android:background="@drawable/wdjl_backgroud">
21 20  
22   - <TextView
  21 + <RelativeLayout
23 22 android:id="@+id/tv_pr"
24   - android:layout_width="wrap_content"
25   - android:layout_height="wrap_content"
26   - android:text="@string/self_best"
27   - android:textColor="@color/white"
28   - android:textSize="17sp" />
29   -
30   - <LinearLayout
31   - android:layout_width="wrap_content"
  23 + android:layout_width="match_parent"
32 24 android:layout_height="wrap_content"
33   - android:layout_alignParentRight="true">
  25 + android:padding="20dp">
34 26  
35 27 <TextView
36   - android:id="@+id/kilometer_num"
37 28 android:layout_width="wrap_content"
38 29 android:layout_height="wrap_content"
  30 + android:layout_centerVertical="true"
  31 + android:text="@string/self_best"
39 32 android:textColor="@color/white"
40   - android:text="0"
41   - android:textSize="30sp" />
  33 + android:textSize="17sp" />
42 34  
43   - <TextView
  35 + <LinearLayout
44 36 android:layout_width="wrap_content"
45 37 android:layout_height="wrap_content"
46   - android:layout_marginLeft="5dp"
47   - android:text="@string/kilometer"
48   - android:textColor="@color/white"
49   - android:textSize="12sp" />
50   - </LinearLayout>
  38 + android:layout_alignParentRight="true"
  39 + android:layout_centerVertical="true">
51 40  
52   - <RelativeLayout
  41 + <TextView
  42 + android:id="@+id/kilometer_num"
  43 + android:layout_width="wrap_content"
  44 + android:layout_height="wrap_content"
  45 + android:text="0"
  46 + android:textColor="@color/white"
  47 + android:textSize="30sp" />
  48 +
  49 + <TextView
  50 + android:layout_width="wrap_content"
  51 + android:layout_height="wrap_content"
  52 + android:layout_marginLeft="5dp"
  53 + android:text="@string/kilometer"
  54 + android:textColor="@color/white"
  55 + android:textSize="12sp" />
  56 + </LinearLayout>
  57 + </RelativeLayout>
  58 +
  59 + <LinearLayout
53 60 android:layout_width="match_parent"
54 61 android:layout_height="wrap_content"
55 62 android:layout_below="@id/tv_pr"
56   - android:layout_marginTop="30dp"
57   - android:layout_marginLeft="20dp"
58   - android:layout_marginRight="20dp">
  63 + android:paddingBottom="20dp"
  64 + android:weightSum="3">
59 65  
60 66 <LinearLayout
61   - android:layout_width="wrap_content"
  67 + android:layout_width="0dp"
62 68 android:layout_height="wrap_content"
  69 + android:layout_weight="1"
63 70 android:orientation="vertical">
64 71  
65 72 <TextView
66 73 android:layout_width="wrap_content"
67 74 android:layout_height="wrap_content"
68   - android:text="@string/stepnum"
69   - android:textSize="12sp"
70 75 android:layout_gravity="center"
71   - android:textColor="@color/white" />
  76 + android:text="@string/stepnum"
  77 + android:textColor="@color/white"
  78 + android:textSize="12sp" />
72 79  
73 80 <TextView
74 81 android:id="@+id/step_num"
75 82 android:layout_width="wrap_content"
76 83 android:layout_height="wrap_content"
  84 + android:layout_gravity="center"
77 85 android:layout_marginTop="5dp"
78   - android:textSize="23sp"
79 86 android:text="0"
80   - android:textColor="@color/white" />
  87 + android:textColor="@color/white"
  88 + android:textSize="23sp" />
81 89 </LinearLayout>
82 90  
83 91  
84 92 <LinearLayout
85   - android:layout_width="wrap_content"
  93 + android:layout_width="0dp"
86 94 android:layout_height="wrap_content"
87   - android:layout_centerInParent="true"
  95 + android:layout_weight="1"
88 96 android:orientation="vertical">
89 97  
90 98 <TextView
91 99 android:layout_width="wrap_content"
92 100 android:layout_height="wrap_content"
93   - android:textSize="12sp"
94 101 android:layout_gravity="center"
95 102 android:text="@string/time_tast"
96   - android:textColor="@color/white" />
  103 + android:textColor="@color/white"
  104 + android:textSize="12sp" />
97 105  
98 106 <TextView
99 107 android:id="@+id/kilometer_time"
... ... @@ -101,24 +109,24 @@
101 109 android:layout_height="wrap_content"
102 110 android:layout_gravity="center"
103 111 android:layout_marginTop="5dp"
104   - android:textSize="23sp"
105 112 android:text="00:00:00"
106   - android:textColor="@color/white" />
  113 + android:textColor="@color/white"
  114 + android:textSize="23sp" />
107 115 </LinearLayout>
108 116  
109 117 <LinearLayout
110   - android:layout_width="wrap_content"
  118 + android:layout_width="0dp"
111 119 android:layout_height="wrap_content"
112   - android:layout_alignParentRight="true"
  120 + android:layout_weight="1"
113 121 android:orientation="vertical">
114 122  
115 123 <TextView
116 124 android:layout_width="wrap_content"
117 125 android:layout_height="wrap_content"
118   - android:textSize="12sp"
119 126 android:layout_gravity="center"
120 127 android:text="@string/v"
121   - android:textColor="@color/white" />
  128 + android:textColor="@color/white"
  129 + android:textSize="12sp" />
122 130  
123 131 <TextView
124 132 android:id="@+id/kilometer_speed"
... ... @@ -126,11 +134,11 @@
126 134 android:layout_height="wrap_content"
127 135 android:layout_gravity="center"
128 136 android:layout_marginTop="5dp"
129   - android:textSize="23sp"
130 137 android:text="--"
131   - android:textColor="@color/white" />
  138 + android:textColor="@color/white"
  139 + android:textSize="23sp" />
132 140 </LinearLayout>
133   - </RelativeLayout>
  141 + </LinearLayout>
134 142  
135 143 </RelativeLayout>
136 144  
... ... @@ -141,9 +149,9 @@
141 149 android:layout_height="wrap_content"
142 150 android:layout_marginLeft="10dp"
143 151 android:layout_marginTop="10dp"
144   - android:textSize="18sp"
  152 + android:text="@string/all_line_record"
145 153 android:textColor="#333333"
146   - android:text="@string/all_line_record" />
  154 + android:textSize="18sp" />
147 155  
148 156 <com.scwang.smartrefresh.layout.SmartRefreshLayout
149 157 android:id="@+id/refreshLayout"
... ... @@ -154,10 +162,40 @@
154 162 android:id="@+id/record_recy"
155 163 android:layout_width="match_parent"
156 164 android:layout_height="match_parent"
157   - android:padding="10dp"
158   - android:background="@color/white" />
  165 + android:background="@color/white"
  166 + android:padding="10dp" />
159 167 </com.scwang.smartrefresh.layout.SmartRefreshLayout>
160 168  
  169 + <RelativeLayout
  170 + android:id="@+id/empty_ry"
  171 + android:layout_width="match_parent"
  172 + android:layout_height="match_parent"
  173 + android:visibility="gone">
  174 +
  175 + <LinearLayout
  176 + android:layout_width="wrap_content"
  177 + android:layout_height="wrap_content"
  178 + android:layout_marginTop="100dp"
  179 + android:layout_centerHorizontal="true"
  180 + android:orientation="vertical">
  181 + <ImageView
  182 + android:layout_width="wrap_content"
  183 + android:layout_height="wrap_content"
  184 + android:src="@drawable/bmcg_has"
  185 + />
  186 + <TextView
  187 + android:layout_width="wrap_content"
  188 + android:layout_height="wrap_content"
  189 + android:text="你还没有该线路的成绩"
  190 + android:layout_marginTop="15dp"
  191 + android:textSize="15sp"
  192 + android:textColor="#333333"
  193 + android:layout_gravity="center"
  194 + />
  195 + </LinearLayout>
  196 +
  197 + </RelativeLayout>
  198 +
161 199 <com.cnlive.strike.ui.widget.UIEmptyView
162 200 android:id="@+id/empty_net"
163 201 android:layout_width="match_parent"
... ...
moudle_pedometer/src/main/res/layout/fragment_run_line.xml
... ... @@ -55,12 +55,15 @@
55 55 <com.scwang.smartrefresh.layout.SmartRefreshLayout
56 56 android:id="@+id/refreshLayout"
57 57 android:layout_width="match_parent"
58   - android:layout_height="match_parent">
  58 + android:layout_height="match_parent"
  59 + android:background="#F4F4F4">
59 60  
60 61 <android.support.v7.widget.RecyclerView
61 62 android:id="@+id/run_line_recy"
62 63 android:layout_width="match_parent"
63   - android:layout_height="match_parent" />
  64 + android:layout_height="match_parent"
  65 + android:padding="5dp"
  66 + />
64 67 </com.scwang.smartrefresh.layout.SmartRefreshLayout>
65 68  
66 69  
... ...
moudle_pedometer/src/main/res/layout/item_my_record.xml
... ... @@ -5,15 +5,15 @@
5 5 android:id="@+id/item_ly"
6 6 android:layout_width="match_parent"
7 7 android:layout_height="wrap_content"
8   - android:layout_margin="10dp"
9   - android:background="@color/white"
  8 + android:layout_marginBottom="5dp"
  9 + android:background="@drawable/background"
10 10 android:orientation="vertical">
11 11  
12 12 <LinearLayout
13 13 android:layout_width="match_parent"
14 14 android:layout_height="wrap_content"
15 15 android:orientation="vertical"
16   - android:padding="10dp">
  16 + android:padding="15dp">
17 17  
18 18 <TextView
19 19 android:id="@+id/line_name"
... ... @@ -21,7 +21,7 @@
21 21 android:layout_height="wrap_content"
22 22 android:textColor="#333333"
23 23 android:singleLine="true"
24   - android:layout_marginRight="30dp"
  24 + android:layout_marginRight="25dp"
25 25 android:textSize="18sp" />
26 26  
27 27 <LinearLayout
... ... @@ -107,8 +107,7 @@
107 107 <RelativeLayout
108 108 android:id="@+id/my_record_ry"
109 109 android:layout_width="wrap_content"
110   - android:layout_height="wrap_content"
111   - android:layout_marginTop="10dp">
  110 + android:layout_height="wrap_content">
112 111  
113 112 <TextView
114 113 android:id="@+id/day_num"
... ... @@ -166,5 +165,7 @@
166 165 android:layout_width="wrap_content"
167 166 android:layout_height="wrap_content"
168 167 android:layout_alignParentRight="true"
  168 + android:layout_marginTop="7dp"
  169 + android:layout_marginRight="5dp"
169 170 android:src="@drawable/yplx_registered" />
170 171 </RelativeLayout>
171 172 \ No newline at end of file
... ...
moudle_pedometer/src/main/res/layout/item_race_record.xml
... ... @@ -15,7 +15,7 @@
15 15 android:layout_width="wrap_content"
16 16 android:layout_height="wrap_content"
17 17 android:text="--"
18   - android:textColor="#333333"
  18 + android:textColor="#999999"
19 19 android:textSize="14sp" />
20 20  
21 21 <TextView
... ...