Commit e4b5e8264a6dbc11f33b63cb7440629dc3d5636e

Authored by 孙向锦
1 parent 3bef6993

表决结果UI修改

C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
@@ -370,7 +370,7 @@ public class ElectionFragment extends BaseFragment { @@ -370,7 +370,7 @@ public class ElectionFragment extends BaseFragment {
370 //tvInfo.setText(""); 370 //tvInfo.setText("");
371 if(voteInfo!=null){ 371 if(voteInfo!=null){
372 if(voteInfo!=null){ 372 if(voteInfo!=null){
373 - tvTitle.setText(bill.title + String.format("(候选人%s人,应选%s人)",houxuan,voteInfo.select) ); 373 + tvTitle.setText(bill.title);
374 } 374 }
375 showVote(); 375 showVote();
376 checkVoted(); 376 checkVoted();
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ResultMultiVoteFragment.java
@@ -95,14 +95,14 @@ public class ResultMultiVoteFragment extends SuperBaseFragment { @@ -95,14 +95,14 @@ public class ResultMultiVoteFragment extends SuperBaseFragment {
95 if (yindao == 0xff || yindao == 0xffff) { 95 if (yindao == 0xff || yindao == 0xffff) {
96 tvYindao.setVisibility(View.GONE); 96 tvYindao.setVisibility(View.GONE);
97 } else { 97 } else {
98 - tvYindao.setText(getString(R.string.yindao) + getString(R.string.maohao) + yindao); 98 + tvYindao.setText("" + + yindao);
99 tvYindao.setVisibility(View.VISIBLE); 99 tvYindao.setVisibility(View.VISIBLE);
100 } 100 }
101 101
102 if (shidao == 0xff || shidao == 0xffff) { 102 if (shidao == 0xff || shidao == 0xffff) {
103 tvShidao.setVisibility(View.GONE); 103 tvShidao.setVisibility(View.GONE);
104 } else { 104 } else {
105 - tvShidao.setText(getString(R.string.shidao) + getString(R.string.maohao) + shidao); 105 + tvShidao.setText("" + shidao);
106 tvShidao.setVisibility(View.VISIBLE); 106 tvShidao.setVisibility(View.VISIBLE);
107 } 107 }
108 108
C5/app/src/main/res/layout/fragment_election.xml
@@ -160,8 +160,6 @@ @@ -160,8 +160,6 @@
160 android:layout_below="@id/election_pannal_OX" 160 android:layout_below="@id/election_pannal_OX"
161 android:layout_marginTop="@dimen/content_margin" 161 android:layout_marginTop="@dimen/content_margin"
162 android:layout_marginBottom="2dp" 162 android:layout_marginBottom="2dp"
163 - android:layout_marginLeft="@dimen/content_margin"  
164 - android:layout_marginRight="@dimen/content_margin"  
165 android:divider="@color/votebakground" 163 android:divider="@color/votebakground"
166 android:dividerHeight="2dp" > 164 android:dividerHeight="2dp" >
167 </ListView> 165 </ListView>
C5/app/src/main/res/layout/fragment_result_multi_vote.xml
@@ -2,8 +2,7 @@ @@ -2,8 +2,7 @@
2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 2 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
3 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 android:layout_height="match_parent" 4 android:layout_height="match_parent"
5 - android:background="#ff004586"  
6 - android:paddingRight="50dp"> 5 + android:background="#ff004586">
7 6
8 <LinearLayout 7 <LinearLayout
9 android:id="@+id/multi_vote_result_top_panal" 8 android:id="@+id/multi_vote_result_top_panal"
@@ -39,8 +38,7 @@ @@ -39,8 +38,7 @@
39 android:layout_width="fill_parent" 38 android:layout_width="fill_parent"
40 android:layout_height="wrap_content" 39 android:layout_height="wrap_content"
41 android:layout_below="@id/multi_vote_result_top_panal" 40 android:layout_below="@id/multi_vote_result_top_panal"
42 - android:layout_marginLeft="20dp"  
43 - android:layout_marginRight="20dp" 41 + android:paddingRight="80dp"
44 android:layout_marginTop="10dp" 42 android:layout_marginTop="10dp"
45 android:orientation="horizontal"> 43 android:orientation="horizontal">
46 44
@@ -61,8 +59,9 @@ @@ -61,8 +59,9 @@
61 android:layout_centerVertical="true" 59 android:layout_centerVertical="true"
62 android:layout_weight="1" 60 android:layout_weight="1"
63 android:gravity="center" 61 android:gravity="center"
64 - android:textColor="@color/white"  
65 - android:textSize="@dimen/big_text_p6" 62 + android:textColor="@color/yellow"
  63 + android:text="表决项"
  64 + android:textSize="@dimen/big_text_p4"
66 android:textStyle="bold" /> 65 android:textStyle="bold" />
67 66
68 <TextView 67 <TextView
@@ -73,7 +72,7 @@ @@ -73,7 +72,7 @@
73 android:layout_marginLeft="15dp" 72 android:layout_marginLeft="15dp"
74 android:gravity="center" 73 android:gravity="center"
75 android:text="@string/agree" 74 android:text="@string/agree"
76 - android:textColor="@color/white" 75 + android:textColor="@color/yellow"
77 android:textSize="@dimen/big_text_p4" 76 android:textSize="@dimen/big_text_p4"
78 android:textStyle="bold" /> 77 android:textStyle="bold" />
79 78
@@ -84,7 +83,7 @@ @@ -84,7 +83,7 @@
84 android:layout_marginLeft="15dp" 83 android:layout_marginLeft="15dp"
85 android:gravity="center" 84 android:gravity="center"
86 android:text="@string/oppose" 85 android:text="@string/oppose"
87 - android:textColor="@color/white" 86 + android:textColor="@color/yellow"
88 android:textSize="@dimen/big_text_p4" 87 android:textSize="@dimen/big_text_p4"
89 android:textStyle="bold" /> 88 android:textStyle="bold" />
90 89
@@ -95,7 +94,7 @@ @@ -95,7 +94,7 @@
95 android:layout_marginLeft="15dp" 94 android:layout_marginLeft="15dp"
96 android:gravity="center" 95 android:gravity="center"
97 android:text="@string/abstant" 96 android:text="@string/abstant"
98 - android:textColor="@color/white" 97 + android:textColor="@color/yellow"
99 android:textSize="@dimen/big_text_p4" 98 android:textSize="@dimen/big_text_p4"
100 android:textStyle="bold" /> 99 android:textStyle="bold" />
101 100
@@ -106,7 +105,7 @@ @@ -106,7 +105,7 @@
106 android:layout_marginLeft="15dp" 105 android:layout_marginLeft="15dp"
107 android:gravity="center" 106 android:gravity="center"
108 android:text="@string/unvote" 107 android:text="@string/unvote"
109 - android:textColor="@color/white" 108 + android:textColor="@color/yellow"
110 android:textSize="@dimen/big_text_p4" 109 android:textSize="@dimen/big_text_p4"
111 android:textStyle="bold" /> 110 android:textStyle="bold" />
112 111
@@ -118,37 +117,73 @@ @@ -118,37 +117,73 @@
118 android:layout_marginLeft="15dp" 117 android:layout_marginLeft="15dp"
119 android:gravity="center" 118 android:gravity="center"
120 android:text="@string/result" 119 android:text="@string/result"
121 - android:textColor="@color/white" 120 + android:textColor="@color/yellow"
122 android:textSize="@dimen/big_text_p4" 121 android:textSize="@dimen/big_text_p4"
123 android:textStyle="bold" /> 122 android:textStyle="bold" />
124 </LinearLayout> 123 </LinearLayout>
125 124
126 - <LinearLayout 125 + <RelativeLayout
127 android:id="@+id/bottom_linear" 126 android:id="@+id/bottom_linear"
128 - android:layout_width="wrap_content" 127 + android:layout_width="match_parent"
129 android:layout_height="wrap_content" 128 android:layout_height="wrap_content"
130 android:layout_alignParentBottom="true" 129 android:layout_alignParentBottom="true"
131 android:layout_centerHorizontal="true" 130 android:layout_centerHorizontal="true"
132 - android:layout_marginBottom="20dp"  
133 - android:orientation="horizontal"> 131 + android:layout_marginBottom="20dp">
134 132
135 - <TextView  
136 - android:id="@+id/multi_vote_result_yindao"  
137 - android:layout_width="wrap_content" 133 + <LinearLayout
  134 + android:layout_width="800dp"
138 android:layout_height="wrap_content" 135 android:layout_height="wrap_content"
139 - android:layout_marginLeft="3dp"  
140 - android:layout_marginRight="150dp"  
141 - android:textColor="@color/white"  
142 - android:textSize="@dimen/big_text_p3" /> 136 + android:layout_centerHorizontal="true"
  137 + android:orientation="horizontal">
  138 +
  139 + <TextView
  140 + android:layout_width="wrap_content"
  141 + android:layout_height="wrap_content"
  142 + android:layout_weight="1"
  143 + android:gravity="right"
  144 + android:text="@string/yindao1"
  145 + android:textColor="@color/yellow"
  146 + android:textSize="@dimen/big_text_p3"
  147 + android:textStyle="bold" />
  148 +
  149 + <TextView
  150 + android:id="@+id/multi_vote_result_yindao"
  151 + android:layout_width="wrap_content"
  152 + android:layout_height="wrap_content"
  153 + android:layout_marginLeft="10dp"
  154 + android:layout_marginRight="60dp"
  155 + android:layout_weight="1"
  156 + android:gravity="left"
  157 + android:text="150"
  158 + android:textColor="@color/white"
  159 + android:textSize="@dimen/big_text_p3" />
  160 +
  161 + <TextView
  162 + android:layout_width="wrap_content"
  163 + android:layout_height="wrap_content"
  164 + android:layout_marginLeft="60dp"
  165 + android:layout_weight="1"
  166 + android:gravity="right"
  167 + android:text="@string/shidao1"
  168 + android:textColor="@color/yellow"
  169 + android:textSize="@dimen/big_text_p3"
  170 + android:textStyle="bold" />
  171 +
  172 + <TextView
  173 + android:id="@+id/multi_vote_result_shidao"
  174 + android:layout_width="wrap_content"
  175 + android:layout_height="wrap_content"
  176 + android:layout_marginLeft="10dp"
  177 + android:layout_weight="1"
  178 + android:gravity="left"
  179 + android:text="150"
  180 + android:textColor="@color/white"
  181 + android:textSize="@dimen/big_text_p3" />
  182 +
  183 + </LinearLayout>
  184 + </RelativeLayout>
  185 +
143 186
144 - <TextView  
145 - android:id="@+id/multi_vote_result_shidao"  
146 - android:layout_width="wrap_content"  
147 - android:layout_height="wrap_content"  
148 - android:layout_marginLeft="150dp"  
149 - android:textColor="@color/white"  
150 - android:textSize="@dimen/big_text_p3" />  
151 - </LinearLayout>  
152 187
153 <ListView 188 <ListView
154 android:id="@+id/multi_vote_result_listview" 189 android:id="@+id/multi_vote_result_listview"
@@ -157,8 +192,6 @@ @@ -157,8 +192,6 @@
157 android:layout_below="@id/multi_vote_result_title_panel" 192 android:layout_below="@id/multi_vote_result_title_panel"
158 android:layout_above="@id/bottom_linear" 193 android:layout_above="@id/bottom_linear"
159 android:layout_marginBottom="10dp" 194 android:layout_marginBottom="10dp"
160 - android:layout_marginLeft="20dp"  
161 - android:layout_marginRight="20dp"  
162 android:divider="@color/material_grey_600" 195 android:divider="@color/material_grey_600"
163 android:dividerHeight="2dp"></ListView> 196 android:dividerHeight="2dp"></ListView>
164 197
C5/app/src/main/res/layout/list_multi_vote_result_item.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 android:layout_width="match_parent" 3 android:layout_width="match_parent"
4 - android:layout_height="match_parent"> 4 + android:layout_height="match_parent"
  5 + android:paddingRight="80dp">
5 6
6 <LinearLayout 7 <LinearLayout
7 android:layout_width="fill_parent" 8 android:layout_width="fill_parent"
@@ -29,6 +30,8 @@ @@ -29,6 +30,8 @@
29 android:layout_gravity="center_vertical" 30 android:layout_gravity="center_vertical"
30 android:layout_marginLeft="10dp" 31 android:layout_marginLeft="10dp"
31 android:layout_weight="1" 32 android:layout_weight="1"
  33 + android:lines="1"
  34 + android:ellipsize="end"
32 android:gravity="center" 35 android:gravity="center"
33 android:textColor="@color/white" 36 android:textColor="@color/white"
34 android:textSize="@dimen/big_text_p5" /> 37 android:textSize="@dimen/big_text_p5" />