Commit 1c5059ddfefde56c53061713dbf1f03ef102e490
1 parent
3e1796db
下载文件UI更新
Showing
11 changed files
with
115 additions
and
57 deletions
C5/app/src/main/java/com/sunvote/xpadapp/fragments/DownloadFragment.java
... | ... | @@ -119,6 +119,7 @@ public class DownloadFragment extends BaseFragment implements FileReciverInterfa |
119 | 119 | case msgConnectError: |
120 | 120 | stopDownload(); |
121 | 121 | if(isUiActive) { |
122 | + download_img.setImageResource(R.drawable.download_fail); | |
122 | 123 | tv.setText(getString(R.string.connect_server_fail)); |
123 | 124 | } |
124 | 125 | break; |
... | ... | @@ -156,16 +157,19 @@ public class DownloadFragment extends BaseFragment implements FileReciverInterfa |
156 | 157 | case msgDownloadDataError: |
157 | 158 | if(isUiActive) { |
158 | 159 | if(++downloadRetryCount >= 3){//重试 n 次 |
160 | + download_img.setImageResource(R.drawable.download_fail); | |
159 | 161 | tv.setText(getString(R.string.download_fail)); |
160 | 162 | break; |
161 | 163 | } |
162 | 164 | stopDownload(); |
165 | + download_img.setImageResource(R.drawable.download_connect); | |
163 | 166 | tv.setText(getString(R.string.download_retry)); |
164 | 167 | getMeetingFilesFromServer(); |
165 | 168 | } |
166 | 169 | break; |
167 | 170 | case msgOnUnzipError: |
168 | 171 | Log.d(TAG, "handleMessage: msgOnUnzipError"); |
172 | + download_img.setImageResource(R.drawable.download_fail); | |
169 | 173 | tv.setText(getString(R.string.unzip_error)); |
170 | 174 | Toast.makeText(mMainActivity,getString(R.string.unzip_error),Toast.LENGTH_LONG).show(); |
171 | 175 | isFinishDownload = true; |
... | ... | @@ -198,6 +202,7 @@ public class DownloadFragment extends BaseFragment implements FileReciverInterfa |
198 | 202 | |
199 | 203 | private void connectServer() { |
200 | 204 | if(isUiActive) { |
205 | + download_img.setImageResource(R.drawable.download_connect); | |
201 | 206 | tv.setText(getString(R.string.connect_server_ing)); |
202 | 207 | } |
203 | 208 | LogUtil.d(TAG, getString(R.string.connect_server_ing)); | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/SinginResultFragment.java
... | ... | @@ -23,9 +23,17 @@ public class SinginResultFragment extends BaseFragment { |
23 | 23 | TextView shidaoresult = view.findViewById(R.id.shidaoresult); |
24 | 24 | TextView yingdaoresult = view.findViewById(R.id.yingdaoresult); |
25 | 25 | TextView weidaoresult = view.findViewById(R.id.weidaoresult); |
26 | + TextView result = view.findViewById(R.id.result); | |
26 | 27 | shidaoresult.setText("" + resultInfo.num3); |
27 | 28 | yingdaoresult.setText("" + resultInfo.num2); |
28 | 29 | weidaoresult.setText("" + resultInfo.num1); |
30 | + if ((resultInfo.bits & 0xF) == 0xF) { | |
31 | + result.setText(""); | |
32 | + } else if ((resultInfo.bits & 0xF) == 0) { | |
33 | + result.setText(R.string.bufuherenshu); | |
34 | + } else { | |
35 | + result.setText(R.string.fuherenshu); | |
36 | + } | |
29 | 37 | return view; |
30 | 38 | } |
31 | 39 | ... | ... |
C5/app/src/main/res/drawable/back.xml
0 → 100644
1 | +<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" | |
2 | + android:viewportWidth="226.6" | |
3 | + android:viewportHeight="226.6" | |
4 | + android:width="226.6dp" | |
5 | + android:height="226.6dp"> | |
6 | + <path | |
7 | + android:pathData="M113.3 0C50.7 0 0 50.7 0 113.3s50.7 113.3 113.3 113.3s113.3 -50.7 113.3 -113.3C226.5 50.8 175.8 0.1 113.3 0L113.3 0zM113.3 212.4c-54.8 0 -99.1 -44.4 -99.1 -99.1s44.4 -99.1 99.1 -99.1s99.1 44.4 99.1 99.1c0 0 0 0 0 0C212.4 168 168 212.4 113.3 212.4L113.3 212.4zM169.9 106.2H73.7l30.4 -30.4c2.9 -2.6 3.1 -7.1 0.5 -10c-2.6 -2.9 -7.1 -3.1 -10 -0.5c-0.2 0.2 -0.3 0.3 -0.5 0.5l-42.5 42.5c-2.8 2.8 -2.8 7.2 0 10l42.5 42.5c2.6 2.9 7.1 3.1 10 0.5c2.9 -2.6 3.1 -7.1 0.5 -10c-0.2 -0.2 -0.3 -0.3 -0.5 -0.5l-30.4 -30.4h96.2c3.9 0 7.1 -3.2 7.1 -7.1C177 109.4 173.9 106.2 169.9 106.2L169.9 106.2z" | |
8 | + android:fillColor="#999999" /> | |
9 | +</vector> | |
0 | 10 | \ No newline at end of file | ... | ... |
C5/app/src/main/res/drawable/download_connect.xml
0 → 100644
1 | +<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" | |
2 | + android:viewportWidth="360" | |
3 | + android:viewportHeight="120" | |
4 | + android:width="360dp" | |
5 | + android:height="120dp"> | |
6 | + <path | |
7 | + android:pathData="M553.4 252.4h-92.5c-16.5 0 -31.8 -8.8 -40.1 -23.1c-8.3 -14.3 -8.3 -31.9 0 -46.3c8.3 -14.3 23.5 -23.1 40.1 -23.1h46.3v-416.3h-647.6v416.3h46.3c25.5 0 46.3 20.7 46.3 46.3c0 25.5 -20.7 46.3 -46.3 46.3h-92.5c-25.6 0 -46.3 -20.7 -46.3 -46.3v-508.9c0 -25.5 20.7 -46.3 46.3 -46.3h740.1c25.6 0 46.3 20.7 46.3 46.3v508.9C599.7 231.7 579 252.4 553.4 252.4L553.4 252.4zM648.5 439.4H370.9v-92.5h277.6c0 0 46.3 0 46.3 46.3C694.7 439.4 648.5 439.4 648.5 439.4L648.5 439.4zM-288.7 439.4h277.6v-92.5h-277.6c0 0 -46.3 0 -46.3 46.3C-335 439.4 -288.7 439.4 -288.7 439.4L-288.7 439.4zM-288.7 439.4" | |
8 | + android:fillColor="#F6FF00" /> | |
9 | + <path | |
10 | + android:pathData="M-125.5 159.8H478.9V252.3H-125.5V159.8Z" | |
11 | + android:fillColor="#F6FF00" /> | |
12 | + <path | |
13 | + android:pathData="M223 218.4V316h-92.5v-97.6H223zM304.5 316v154.2H48.9V316H304.5zM304.5 316" | |
14 | + android:fillColor="#F6FF00" /> | |
15 | +</vector> | |
0 | 16 | \ No newline at end of file | ... | ... |
C5/app/src/main/res/drawable/download_fail.xml
0 → 100644
1 | +<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" | |
2 | + android:viewportWidth="293.3" | |
3 | + android:viewportHeight="292.9" | |
4 | + android:width="293.3dp" | |
5 | + android:height="292.9dp"> | |
6 | + <path | |
7 | + android:pathData="M150 168.8l-57.1 58.1c-2.8 2.9 -6.7 4.5 -10.7 4.5c-4 0 -7.9 -1.6 -10.7 -4.5c-5.9 -6 -5.9 -15.7 0 -21.8l57.1 -58.1L71.5 88.9c-5.9 -6 -5.9 -15.8 0 -21.8c5.9 -6 15.5 -6 21.4 0l57.1 58.1l57.1 -58.1c5.9 -6 15.5 -6 21.4 0c5.9 6 5.9 15.8 0 21.8L171.4 147l57.1 58.1c5.9 6 5.9 15.8 0 21.8c-5.9 6 -15.5 6 -21.4 0L150 168.8L150 168.8zM279.3 132.6c7.7 0 13.9 6.2 13.9 13.9c0 80.7 -65.8 146.4 -146.6 146.4C65.8 292.9 0 227.2 0 146.4C0 65.7 65.8 0 146.6 0c32.1 0 62.5 10.1 88 29.3c3 2.2 4.9 5.5 5.4 9.1c0.5 3.6 -0.4 7.4 -2.7 10.3c-2.6 3.5 -6.8 5.5 -11.1 5.5c-3 0 -5.9 -1 -8.4 -2.8c-20.7 -15.5 -45.3 -23.7 -71.3 -23.7C81.1 27.8 27.8 81 27.8 146.4c0 65.4 53.3 118.7 118.8 118.7c65.5 0 118.8 -53.2 118.8 -118.7C265.4 138.8 271.7 132.6 279.3 132.6L279.3 132.6zM279.3 132.6" | |
8 | + android:fillColor="#F6FF00" /> | |
9 | +</vector> | |
0 | 10 | \ No newline at end of file | ... | ... |
C5/app/src/main/res/drawable/page_frist.xml
1 | 1 | <vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt" |
2 | - android:viewportWidth="96.4" | |
2 | + android:viewportWidth="104.2" | |
3 | 3 | android:viewportHeight="103.4" |
4 | - android:width="96.4dp" | |
4 | + android:width="104.2dp" | |
5 | 5 | android:height="103.4dp"> |
6 | 6 | <group> |
7 | 7 | <clip-path |
8 | - android:pathData="M0 0H96.4V103.4H0V0Z" /> | |
8 | + android:pathData="M0.5 3.5H103.9V99.9H0.5V3.5Z" /> | |
9 | 9 | <path |
10 | - android:pathData="M12.3 101.1l53 -40c6.8 -5.1 6.8 -13.5 0 -18.6l-53 -40C5.6 -2.6 0 1 0 10.5v82.7C0 102.7 5.6 106.2 12.3 101.1L12.3 101.1zM89.8 0.2c3.6 0 6.4 2.9 6.5 6.5V97c0 3.6 -2.9 6.4 -6.5 6.5c-3.6 0 -6.4 -2.9 -6.5 -6.5V6.7C83.4 3.1 86.3 0.2 89.8 0.2L89.8 0.2zM89.8 0.2" | |
10 | + android:pathData="M2.8 15.8l40 53c5.1 6.8 13.5 6.8 18.6 0l40 -53c5.1 -6.7 1.5 -12.3 -8 -12.3H10.7C1.2 3.5 -2.3 9.1 2.8 15.8L2.8 15.8zM103.7 93.3c0 3.6 -2.9 6.4 -6.5 6.5H6.9c-3.6 0 -6.4 -2.9 -6.5 -6.5c0 -3.6 2.9 -6.4 6.5 -6.5h90.3C100.8 86.9 103.7 89.8 103.7 93.3L103.7 93.3z" | |
11 | 11 | android:fillColor="#000000" |
12 | 12 | android:fillAlpha="0.8" /> |
13 | 13 | </group> | ... | ... |
C5/app/src/main/res/layout/fragment_admin.xml
... | ... | @@ -77,11 +77,11 @@ |
77 | 77 | |
78 | 78 | <ImageButton |
79 | 79 | android:id="@+id/admin_btnback" |
80 | - android:layout_width="wrap_content" | |
81 | - android:layout_height="wrap_content" | |
80 | + android:layout_width="60dp" | |
81 | + android:layout_height="60dp" | |
82 | 82 | android:layout_marginLeft="20dp" |
83 | 83 | android:layout_marginTop="20dp" |
84 | - android:background="@drawable/back_selector" /> | |
84 | + android:background="@drawable/back" /> | |
85 | 85 | |
86 | 86 | |
87 | 87 | ... | ... |
C5/app/src/main/res/layout/fragment_multi_content_detail.xml
... | ... | @@ -2,45 +2,51 @@ |
2 | 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="match_parent" |
5 | - android:background="@color/votebakground" > | |
5 | + android:background="@color/votebakground"> | |
6 | 6 | |
7 | 7 | <!--标题--> |
8 | 8 | <LinearLayout |
9 | 9 | android:id="@+id/title_linear" |
10 | 10 | android:layout_width="match_parent" |
11 | 11 | android:layout_height="wrap_content" |
12 | - android:layout_marginTop="@dimen/content_margin" | |
13 | - android:layout_marginLeft="@dimen/content_margin" | |
14 | - android:layout_marginRight="@dimen/content_margin" | |
15 | - android:orientation="horizontal"> | |
12 | + android:background="#AC1007" | |
13 | + android:orientation="horizontal" | |
14 | + android:paddingBottom="20dp" | |
15 | + android:paddingLeft="20dp" | |
16 | + android:paddingTop="20dp" | |
17 | + android:paddingRight="80dp"> | |
16 | 18 | |
17 | 19 | <ImageButton |
18 | 20 | android:id="@+id/content_detail_btnback" |
19 | 21 | android:layout_width="wrap_content" |
20 | 22 | android:layout_height="wrap_content" |
23 | + android:layout_gravity="center_vertical" | |
21 | 24 | android:background="@drawable/back_selector" /> |
22 | 25 | |
23 | 26 | <TextView |
24 | 27 | android:id="@+id/content_detail_title" |
25 | 28 | android:layout_width="0dp" |
26 | 29 | android:layout_height="wrap_content" |
30 | + android:layout_gravity="center_vertical" | |
27 | 31 | android:layout_marginLeft="10dp" |
32 | + android:layout_weight="1" | |
28 | 33 | android:ellipsize="end" |
29 | 34 | android:gravity="left" |
30 | 35 | android:lines="1" |
31 | 36 | android:text="title" |
32 | - android:textSize="@dimen/big_text_p3" | |
33 | - android:textColor="@color/black" | |
34 | - android:textStyle="bold" | |
35 | - android:layout_weight="1"/> | |
37 | + android:textColor="@color/white" | |
38 | + android:textSize="@dimen/big_text_p4" | |
39 | + android:textStyle="bold" /> | |
36 | 40 | |
37 | 41 | <Button |
38 | 42 | android:id="@+id/btn_look_pdf" |
39 | 43 | android:layout_width="@dimen/button_width" |
40 | 44 | android:layout_height="@dimen/button_heigh" |
45 | + android:layout_gravity="center_vertical" | |
46 | + android:layout_marginRight="20dp" | |
41 | 47 | android:background="@drawable/signin_selector" |
42 | 48 | android:text="查看批注" |
43 | - android:textColor="@color/white" | |
49 | + android:textColor="@color/yellow" | |
44 | 50 | android:textSize="@dimen/big_text_p4" |
45 | 51 | android:textStyle="bold" /> |
46 | 52 | |
... | ... | @@ -52,7 +58,7 @@ |
52 | 58 | android:layout_height="@dimen/linear_heigh" |
53 | 59 | android:layout_alignParentBottom="true" |
54 | 60 | android:alpha="0.9" |
55 | - android:background="@drawable/black_alpha" > | |
61 | + android:background="@drawable/black_alpha"> | |
56 | 62 | |
57 | 63 | <Button |
58 | 64 | android:id="@+id/content_detail_btnB" |
... | ... | @@ -93,28 +99,6 @@ |
93 | 99 | android:textSize="@dimen/big_text_p4" |
94 | 100 | android:textStyle="bold" /> |
95 | 101 | </RelativeLayout> |
96 | - <!--投票状态--> | |
97 | - <RelativeLayout | |
98 | - android:id="@+id/content_detail_pannal_tips" | |
99 | - android:layout_width="match_parent" | |
100 | - android:layout_height="@dimen/linear_heigh" | |
101 | - android:layout_alignParentBottom="true" | |
102 | - android:alpha="0.9" | |
103 | - android:background="@drawable/black_alpha" | |
104 | - android:visibility="invisible"> | |
105 | - | |
106 | - <TextView | |
107 | - android:id="@+id/content_detail_tv_tips" | |
108 | - android:layout_width="wrap_content" | |
109 | - android:layout_height="wrap_content" | |
110 | - android:layout_centerHorizontal="true" | |
111 | - android:layout_centerVertical="true" | |
112 | - android:text="@string/submiting" | |
113 | - android:textColor="@color/white" | |
114 | - android:textSize="@dimen/big_text_p4" | |
115 | - android:textStyle="bold" | |
116 | - /> | |
117 | - </RelativeLayout> | |
118 | 102 | <!--修改选项--> |
119 | 103 | <RelativeLayout |
120 | 104 | android:id="@+id/content_detail_pannal_modify" |
... | ... | @@ -142,8 +126,8 @@ |
142 | 126 | android:layout_width="match_parent" |
143 | 127 | android:layout_height="@dimen/linear_heigh" |
144 | 128 | android:layout_alignParentBottom="true" |
145 | - android:gravity="center_horizontal" | |
146 | 129 | android:background="@drawable/black_alpha" |
130 | + android:gravity="center_horizontal" | |
147 | 131 | android:visibility="gone"> |
148 | 132 | |
149 | 133 | </RelativeLayout> |
... | ... | @@ -159,15 +143,35 @@ |
159 | 143 | android:layout_marginRight="@dimen/content_margin" |
160 | 144 | android:layout_marginTop="@dimen/content_margin" |
161 | 145 | android:background="@color/white" |
162 | - android:fillViewport="false" > | |
146 | + android:fillViewport="false"> | |
147 | + | |
163 | 148 | <com.github.barteksc.pdfviewer.PDFView |
164 | 149 | android:id="@+id/content_detail_pdfview" |
165 | 150 | android:layout_width="match_parent" |
166 | 151 | android:layout_height="match_parent" |
167 | 152 | android:layout_marginLeft="86dp" |
168 | 153 | android:layout_marginRight="86dp" |
169 | - android:background="@color/white" | |
170 | - /> | |
154 | + android:background="@color/white" /> | |
155 | + <!--投票状态--> | |
156 | + <RelativeLayout | |
157 | + android:id="@+id/content_detail_pannal_tips" | |
158 | + android:layout_width="match_parent" | |
159 | + android:layout_height="@dimen/linear_heigh" | |
160 | + android:layout_alignParentBottom="true" | |
161 | + android:background="@color/yellow" | |
162 | + android:visibility="invisible"> | |
163 | + | |
164 | + <TextView | |
165 | + android:id="@+id/content_detail_tv_tips" | |
166 | + android:layout_width="wrap_content" | |
167 | + android:layout_height="wrap_content" | |
168 | + android:layout_centerHorizontal="true" | |
169 | + android:layout_centerVertical="true" | |
170 | + android:text="@string/submiting" | |
171 | + android:textColor="@color/red" | |
172 | + android:textSize="@dimen/big_text_p4" | |
173 | + android:textStyle="bold" /> | |
174 | + </RelativeLayout> | |
171 | 175 | </RelativeLayout> |
172 | 176 | <!--投票结果,居中显示--> |
173 | 177 | <TextView |
... | ... | @@ -178,8 +182,8 @@ |
178 | 182 | android:layout_centerInParent="true" |
179 | 183 | android:layout_marginTop="@dimen/content_margin" |
180 | 184 | android:alpha="0.9" |
181 | - android:rotation="-20" | |
182 | 185 | android:gravity="center" |
186 | + android:rotation="-20" | |
183 | 187 | android:textColor="#ddff9933" |
184 | 188 | android:textSize="@dimen/big_text_p2" |
185 | 189 | android:textStyle="bold" |
... | ... | @@ -190,20 +194,19 @@ |
190 | 194 | android:layout_width="fill_parent" |
191 | 195 | android:layout_height="fill_parent" |
192 | 196 | android:background="#ff000000" |
193 | - android:visibility="gone" | |
194 | - > | |
197 | + android:visibility="gone"> | |
195 | 198 | |
196 | 199 | <TextView |
197 | 200 | android:id="@+id/content_detail_confirm_textview" |
198 | 201 | android:layout_width="wrap_content" |
199 | 202 | android:layout_height="wrap_content" |
200 | 203 | android:layout_centerHorizontal="true" |
201 | - android:layout_marginTop="@dimen/button_to_content" | |
202 | - android:text="@string/cant_modify_confirm" | |
203 | - android:textColor="@color/white" | |
204 | 204 | android:layout_marginLeft="@dimen/content_margin" |
205 | 205 | android:layout_marginRight="@dimen/content_margin" |
206 | + android:layout_marginTop="@dimen/button_to_content" | |
206 | 207 | android:gravity="center" |
208 | + android:text="@string/cant_modify_confirm" | |
209 | + android:textColor="@color/white" | |
207 | 210 | android:textSize="@dimen/big_text_p4" /> |
208 | 211 | |
209 | 212 | <Button | ... | ... |
C5/app/src/main/res/layout/fragment_multi_title.xml
... | ... | @@ -66,7 +66,6 @@ |
66 | 66 | android:id="@+id/multivote_pannal_bottom" |
67 | 67 | android:layout_width="match_parent" |
68 | 68 | android:layout_height="80dp" |
69 | - android:paddingTop="20dp" | |
70 | 69 | android:layout_alignParentBottom="true" |
71 | 70 | android:alpha="0.9" |
72 | 71 | android:background="@drawable/gray_alpha"> | ... | ... |
C5/app/src/main/res/layout/fragment_signin_result_vote.xml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | android:layout_width="wrap_content" |
10 | 10 | android:layout_height="wrap_content" |
11 | 11 | android:layout_centerHorizontal="true" |
12 | - android:layout_marginTop="120dp" | |
12 | + android:layout_marginTop="100dp" | |
13 | 13 | android:text="@string/signin_result" |
14 | 14 | android:textColor="@color/yellow" |
15 | 15 | android:textSize="@dimen/big_text_p2" |
... | ... | @@ -104,6 +104,16 @@ |
104 | 104 | |
105 | 105 | </RelativeLayout> |
106 | 106 | |
107 | + <TextView | |
108 | + android:id="@+id/result" | |
109 | + android:layout_width="wrap_content" | |
110 | + android:layout_height="wrap_content" | |
111 | + android:layout_centerHorizontal="true" | |
112 | + android:layout_alignParentBottom="true" | |
113 | + android:textSize="@dimen/big_text_p4" | |
114 | + android:textColor="@color/yellow" | |
115 | + android:layout_marginBottom="40dp"/> | |
116 | + | |
107 | 117 | <View |
108 | 118 | android:layout_width="match_parent" |
109 | 119 | android:layout_height="1dp" | ... | ... |
C5/app/src/main/res/layout/list_multi_title_item.xml
... | ... | @@ -15,17 +15,17 @@ |
15 | 15 | |
16 | 16 | <TextView |
17 | 17 | android:id="@+id/list_multivote_item_num" |
18 | - android:layout_width="wrap_content" | |
19 | - android:layout_height="wrap_content" | |
18 | + android:layout_width="40dp" | |
19 | + android:layout_height="40dp" | |
20 | 20 | android:layout_marginLeft="15dp" |
21 | 21 | android:layout_marginTop="5dp" |
22 | 22 | android:layout_marginBottom="5dp" |
23 | 23 | android:background="@drawable/bh_cicle" |
24 | 24 | android:gravity="center" |
25 | 25 | android:lines="1" |
26 | - android:text="1" | |
26 | + android:text="88" | |
27 | 27 | android:textColor="@color/white" |
28 | - android:textSize="@dimen/big_text_p4" /> | |
28 | + android:textSize="@dimen/big_text_p5" /> | |
29 | 29 | |
30 | 30 | <TextView |
31 | 31 | android:id="@+id/list_multivote_item_content" |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | android:paddingBottom="10dp" |
40 | 40 | android:text="@string/content" |
41 | 41 | android:textColor="@color/black" |
42 | - android:textSize="@dimen/big_text_p4" /> | |
42 | + android:textSize="@dimen/big_text_p5" /> | |
43 | 43 | </LinearLayout> |
44 | 44 | |
45 | 45 | <LinearLayout | ... | ... |