Commit e4b5e8264a6dbc11f33b63cb7440629dc3d5636e
1 parent
3bef6993
表决结果UI修改
Showing
5 changed files
with
72 additions
and
38 deletions
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
| ... | ... | @@ -370,7 +370,7 @@ public class ElectionFragment extends BaseFragment { |
| 370 | 370 | //tvInfo.setText(""); |
| 371 | 371 | if(voteInfo!=null){ |
| 372 | 372 | if(voteInfo!=null){ |
| 373 | - tvTitle.setText(bill.title + String.format("(候选人%s人,应选%s人)",houxuan,voteInfo.select) ); | |
| 373 | + tvTitle.setText(bill.title); | |
| 374 | 374 | } |
| 375 | 375 | showVote(); |
| 376 | 376 | checkVoted(); | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ResultMultiVoteFragment.java
| ... | ... | @@ -95,14 +95,14 @@ public class ResultMultiVoteFragment extends SuperBaseFragment { |
| 95 | 95 | if (yindao == 0xff || yindao == 0xffff) { |
| 96 | 96 | tvYindao.setVisibility(View.GONE); |
| 97 | 97 | } else { |
| 98 | - tvYindao.setText(getString(R.string.yindao) + getString(R.string.maohao) + yindao); | |
| 98 | + tvYindao.setText("" + + yindao); | |
| 99 | 99 | tvYindao.setVisibility(View.VISIBLE); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | if (shidao == 0xff || shidao == 0xffff) { |
| 103 | 103 | tvShidao.setVisibility(View.GONE); |
| 104 | 104 | } else { |
| 105 | - tvShidao.setText(getString(R.string.shidao) + getString(R.string.maohao) + shidao); | |
| 105 | + tvShidao.setText("" + shidao); | |
| 106 | 106 | tvShidao.setVisibility(View.VISIBLE); |
| 107 | 107 | } |
| 108 | 108 | ... | ... |
C5/app/src/main/res/layout/fragment_election.xml
| ... | ... | @@ -160,8 +160,6 @@ |
| 160 | 160 | android:layout_below="@id/election_pannal_OX" |
| 161 | 161 | android:layout_marginTop="@dimen/content_margin" |
| 162 | 162 | android:layout_marginBottom="2dp" |
| 163 | - android:layout_marginLeft="@dimen/content_margin" | |
| 164 | - android:layout_marginRight="@dimen/content_margin" | |
| 165 | 163 | android:divider="@color/votebakground" |
| 166 | 164 | android:dividerHeight="2dp" > |
| 167 | 165 | </ListView> | ... | ... |
C5/app/src/main/res/layout/fragment_result_multi_vote.xml
| ... | ... | @@ -2,8 +2,7 @@ |
| 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="#ff004586" | |
| 6 | - android:paddingRight="50dp"> | |
| 5 | + android:background="#ff004586"> | |
| 7 | 6 | |
| 8 | 7 | <LinearLayout |
| 9 | 8 | android:id="@+id/multi_vote_result_top_panal" |
| ... | ... | @@ -39,8 +38,7 @@ |
| 39 | 38 | android:layout_width="fill_parent" |
| 40 | 39 | android:layout_height="wrap_content" |
| 41 | 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 | 42 | android:layout_marginTop="10dp" |
| 45 | 43 | android:orientation="horizontal"> |
| 46 | 44 | |
| ... | ... | @@ -61,8 +59,9 @@ |
| 61 | 59 | android:layout_centerVertical="true" |
| 62 | 60 | android:layout_weight="1" |
| 63 | 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 | 65 | android:textStyle="bold" /> |
| 67 | 66 | |
| 68 | 67 | <TextView |
| ... | ... | @@ -73,7 +72,7 @@ |
| 73 | 72 | android:layout_marginLeft="15dp" |
| 74 | 73 | android:gravity="center" |
| 75 | 74 | android:text="@string/agree" |
| 76 | - android:textColor="@color/white" | |
| 75 | + android:textColor="@color/yellow" | |
| 77 | 76 | android:textSize="@dimen/big_text_p4" |
| 78 | 77 | android:textStyle="bold" /> |
| 79 | 78 | |
| ... | ... | @@ -84,7 +83,7 @@ |
| 84 | 83 | android:layout_marginLeft="15dp" |
| 85 | 84 | android:gravity="center" |
| 86 | 85 | android:text="@string/oppose" |
| 87 | - android:textColor="@color/white" | |
| 86 | + android:textColor="@color/yellow" | |
| 88 | 87 | android:textSize="@dimen/big_text_p4" |
| 89 | 88 | android:textStyle="bold" /> |
| 90 | 89 | |
| ... | ... | @@ -95,7 +94,7 @@ |
| 95 | 94 | android:layout_marginLeft="15dp" |
| 96 | 95 | android:gravity="center" |
| 97 | 96 | android:text="@string/abstant" |
| 98 | - android:textColor="@color/white" | |
| 97 | + android:textColor="@color/yellow" | |
| 99 | 98 | android:textSize="@dimen/big_text_p4" |
| 100 | 99 | android:textStyle="bold" /> |
| 101 | 100 | |
| ... | ... | @@ -106,7 +105,7 @@ |
| 106 | 105 | android:layout_marginLeft="15dp" |
| 107 | 106 | android:gravity="center" |
| 108 | 107 | android:text="@string/unvote" |
| 109 | - android:textColor="@color/white" | |
| 108 | + android:textColor="@color/yellow" | |
| 110 | 109 | android:textSize="@dimen/big_text_p4" |
| 111 | 110 | android:textStyle="bold" /> |
| 112 | 111 | |
| ... | ... | @@ -118,37 +117,73 @@ |
| 118 | 117 | android:layout_marginLeft="15dp" |
| 119 | 118 | android:gravity="center" |
| 120 | 119 | android:text="@string/result" |
| 121 | - android:textColor="@color/white" | |
| 120 | + android:textColor="@color/yellow" | |
| 122 | 121 | android:textSize="@dimen/big_text_p4" |
| 123 | 122 | android:textStyle="bold" /> |
| 124 | 123 | </LinearLayout> |
| 125 | 124 | |
| 126 | - <LinearLayout | |
| 125 | + <RelativeLayout | |
| 127 | 126 | android:id="@+id/bottom_linear" |
| 128 | - android:layout_width="wrap_content" | |
| 127 | + android:layout_width="match_parent" | |
| 129 | 128 | android:layout_height="wrap_content" |
| 130 | 129 | android:layout_alignParentBottom="true" |
| 131 | 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 | 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 | 188 | <ListView |
| 154 | 189 | android:id="@+id/multi_vote_result_listview" |
| ... | ... | @@ -157,8 +192,6 @@ |
| 157 | 192 | android:layout_below="@id/multi_vote_result_title_panel" |
| 158 | 193 | android:layout_above="@id/bottom_linear" |
| 159 | 194 | android:layout_marginBottom="10dp" |
| 160 | - android:layout_marginLeft="20dp" | |
| 161 | - android:layout_marginRight="20dp" | |
| 162 | 195 | android:divider="@color/material_grey_600" |
| 163 | 196 | android:dividerHeight="2dp"></ListView> |
| 164 | 197 | ... | ... |
C5/app/src/main/res/layout/list_multi_vote_result_item.xml
| 1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | 2 | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | 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 | 7 | <LinearLayout |
| 7 | 8 | android:layout_width="fill_parent" |
| ... | ... | @@ -29,6 +30,8 @@ |
| 29 | 30 | android:layout_gravity="center_vertical" |
| 30 | 31 | android:layout_marginLeft="10dp" |
| 31 | 32 | android:layout_weight="1" |
| 33 | + android:lines="1" | |
| 34 | + android:ellipsize="end" | |
| 32 | 35 | android:gravity="center" |
| 33 | 36 | android:textColor="@color/white" |
| 34 | 37 | android:textSize="@dimen/big_text_p5" /> | ... | ... |