Commit 691d9f67bd8d04d019af9af334931fdea27cbaab
1 parent
a5a485e9
修改投票选举UI,相关UI的业务逻辑
Showing
8 changed files
with
183 additions
and
92 deletions
C5/app/src/main/AndroidManifest.xml
| @@ -4,9 +4,6 @@ | @@ -4,9 +4,6 @@ | ||
| 4 | package="com.sunvote.xpadapp" | 4 | package="com.sunvote.xpadapp" |
| 5 | android:versionCode="70" | 5 | android:versionCode="70" |
| 6 | android:versionName="1.3.0.0"> <!-- android:sharedUserId="android.studentUID.system" --> | 6 | android:versionName="1.3.0.0"> <!-- android:sharedUserId="android.studentUID.system" --> |
| 7 | - <uses-sdk | ||
| 8 | - android:minSdkVersion="11" | ||
| 9 | - android:targetSdkVersion="23" /> | ||
| 10 | 7 | ||
| 11 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"></uses-permission> | 8 | <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE"></uses-permission> |
| 12 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission> | 9 | <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission> |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
| @@ -6,6 +6,7 @@ import android.graphics.Bitmap; | @@ -6,6 +6,7 @@ import android.graphics.Bitmap; | ||
| 6 | import android.graphics.BitmapFactory; | 6 | import android.graphics.BitmapFactory; |
| 7 | import android.os.Bundle; | 7 | import android.os.Bundle; |
| 8 | import android.os.Environment; | 8 | import android.os.Environment; |
| 9 | +import android.text.Html; | ||
| 9 | import android.text.Spannable; | 10 | import android.text.Spannable; |
| 10 | import android.text.SpannableStringBuilder; | 11 | import android.text.SpannableStringBuilder; |
| 11 | import android.text.TextUtils; | 12 | import android.text.TextUtils; |
| @@ -155,6 +156,8 @@ public class ElectionFragment extends BaseFragment { | @@ -155,6 +156,8 @@ public class ElectionFragment extends BaseFragment { | ||
| 155 | } | 156 | } |
| 156 | drawView.clear(); | 157 | drawView.clear(); |
| 157 | addOtherLayout.setVisibility(View.VISIBLE); | 158 | addOtherLayout.setVisibility(View.VISIBLE); |
| 159 | + tvInfo.setVisibility(View.GONE); | ||
| 160 | + list_election_item_add_btn.setVisibility(View.GONE); | ||
| 158 | } | 161 | } |
| 159 | }); | 162 | }); |
| 160 | addOtherLayout.setOnClickListener(new OnClickListener() { | 163 | addOtherLayout.setOnClickListener(new OnClickListener() { |
| @@ -347,6 +350,8 @@ public class ElectionFragment extends BaseFragment { | @@ -347,6 +350,8 @@ public class ElectionFragment extends BaseFragment { | ||
| 347 | aryContent.add(aryContent.size() , it); | 350 | aryContent.add(aryContent.size() , it); |
| 348 | mAdapter.notifyDataSetChanged(); | 351 | mAdapter.notifyDataSetChanged(); |
| 349 | addOtherLayout.setVisibility(View.GONE); | 352 | addOtherLayout.setVisibility(View.GONE); |
| 353 | + tvInfo.setVisibility(View.VISIBLE); | ||
| 354 | + list_election_item_add_btn.setVisibility(View.VISIBLE); | ||
| 350 | checkVoted(); | 355 | checkVoted(); |
| 351 | edtOther.setText(""); | 356 | edtOther.setText(""); |
| 352 | } | 357 | } |
| @@ -358,6 +363,8 @@ public class ElectionFragment extends BaseFragment { | @@ -358,6 +363,8 @@ public class ElectionFragment extends BaseFragment { | ||
| 358 | public void onClick(View v) { | 363 | public void onClick(View v) { |
| 359 | edtOther.setText(""); | 364 | edtOther.setText(""); |
| 360 | addOtherLayout.setVisibility(View.GONE); | 365 | addOtherLayout.setVisibility(View.GONE); |
| 366 | + tvInfo.setVisibility(View.VISIBLE); | ||
| 367 | + list_election_item_add_btn.setVisibility(View.VISIBLE); | ||
| 361 | KeyboardUtils.hideSoftInput(getActivity()); | 368 | KeyboardUtils.hideSoftInput(getActivity()); |
| 362 | } | 369 | } |
| 363 | }); | 370 | }); |
| @@ -657,7 +664,7 @@ public class ElectionFragment extends BaseFragment { | @@ -657,7 +664,7 @@ public class ElectionFragment extends BaseFragment { | ||
| 657 | holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to | 664 | holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to |
| 658 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); | 665 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); |
| 659 | holder.btnDel = (RadioButton) convertView.findViewById(R.id.list_election_item_del); | 666 | holder.btnDel = (RadioButton) convertView.findViewById(R.id.list_election_item_del); |
| 660 | - holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); | 667 | + //holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); |
| 661 | convertView.setTag(holder); | 668 | convertView.setTag(holder); |
| 662 | } else { | 669 | } else { |
| 663 | holder = (ViewHolder) convertView.getTag(); | 670 | holder = (ViewHolder) convertView.getTag(); |
| @@ -674,21 +681,21 @@ public class ElectionFragment extends BaseFragment { | @@ -674,21 +681,21 @@ public class ElectionFragment extends BaseFragment { | ||
| 674 | 681 | ||
| 675 | if (it.No > 0) { | 682 | if (it.No > 0) { |
| 676 | holder.btnX.setVisibility(View.VISIBLE); | 683 | holder.btnX.setVisibility(View.VISIBLE); |
| 677 | - holder.btnDel.setVisibility(View.INVISIBLE); | 684 | + holder.btnDel.setVisibility(View.GONE); |
| 678 | }else | 685 | }else |
| 679 | { | 686 | { |
| 680 | holder.btnX.setVisibility(View.GONE); | 687 | holder.btnX.setVisibility(View.GONE); |
| 681 | holder.btnDel.setVisibility(View.VISIBLE); | 688 | holder.btnDel.setVisibility(View.VISIBLE); |
| 682 | } | 689 | } |
| 683 | 690 | ||
| 684 | - String bookImgPath = (String)SharedPreferencesUtil.getData(getActivity(),it.title,""); | 691 | + /*String bookImgPath = (String)SharedPreferencesUtil.getData(getActivity(),it.title,""); |
| 685 | if(!TextUtils.isEmpty(bookImgPath)){ | 692 | if(!TextUtils.isEmpty(bookImgPath)){ |
| 686 | holder.imgBook.setVisibility(View.VISIBLE); | 693 | holder.imgBook.setVisibility(View.VISIBLE); |
| 687 | Bitmap bitmap = BitmapFactory.decodeFile(bookImgPath); | 694 | Bitmap bitmap = BitmapFactory.decodeFile(bookImgPath); |
| 688 | holder.imgBook.setImageBitmap(bitmap); | 695 | holder.imgBook.setImageBitmap(bitmap); |
| 689 | }else{ | 696 | }else{ |
| 690 | holder.imgBook.setVisibility(View.GONE); | 697 | holder.imgBook.setVisibility(View.GONE); |
| 691 | - } | 698 | + }*/ |
| 692 | 699 | ||
| 693 | if(it.modifyModel){ | 700 | if(it.modifyModel){ |
| 694 | holder.btnO.setEnabled(false); | 701 | holder.btnO.setEnabled(false); |
| @@ -817,15 +824,20 @@ public class ElectionFragment extends BaseFragment { | @@ -817,15 +824,20 @@ public class ElectionFragment extends BaseFragment { | ||
| 817 | } | 824 | } |
| 818 | } | 825 | } |
| 819 | if(voteInfo!=null){ | 826 | if(voteInfo!=null){ |
| 820 | - tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person)); | 827 | + String s=getString(R.string.should_select1); |
| 828 | + String str= String.format("%s<font color='#FFFF00'><big>%s</big></font>%s",getString(R.string.should_select1),votedCount,getString(R.string.person)); | ||
| 829 | + tvInfo.setText(Html.fromHtml(str)); | ||
| 830 | + //tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person)); | ||
| 821 | } | 831 | } |
| 822 | mAdapter.notifyDataSetChanged(); | 832 | mAdapter.notifyDataSetChanged(); |
| 823 | listview.invalidate(); | 833 | listview.invalidate(); |
| 824 | 834 | ||
| 825 | if((aryContent.size()- voteInfo.select)<checkOpposeVoted()){ | 835 | if((aryContent.size()- voteInfo.select)<checkOpposeVoted()){ |
| 826 | - list_election_item_add_btn.setVisibility(View.VISIBLE); | 836 | + //list_election_item_add_btn.setVisibility(View.VISIBLE); |
| 837 | + list_election_item_add_btn.setEnabled(true); | ||
| 827 | }else{ | 838 | }else{ |
| 828 | - list_election_item_add_btn.setVisibility(View.GONE); | 839 | + //list_election_item_add_btn.setVisibility(View.GONE); |
| 840 | + list_election_item_add_btn.setEnabled(false); | ||
| 829 | } | 841 | } |
| 830 | } | 842 | } |
| 831 | 843 |
C5/app/src/main/res/drawable/darkgrey_round_button.xml
| @@ -5,5 +5,5 @@ | @@ -5,5 +5,5 @@ | ||
| 5 | <!-- 填充的颜色 --> | 5 | <!-- 填充的颜色 --> |
| 6 | <solid android:color="@color/darkgrey" /> | 6 | <solid android:color="@color/darkgrey" /> |
| 7 | <!-- 圆角的半径 --> | 7 | <!-- 圆角的半径 --> |
| 8 | - <corners android:radius="@dimen/px2dp_10" /> | 8 | + <corners android:radius="@dimen/px10dp" /> |
| 9 | </shape> | 9 | </shape> |
C5/app/src/main/res/drawable/green_round_button.xml
| @@ -5,5 +5,5 @@ | @@ -5,5 +5,5 @@ | ||
| 5 | <!-- 填充的颜色 --> | 5 | <!-- 填充的颜色 --> |
| 6 | <solid android:color="@color/green1" /> | 6 | <solid android:color="@color/green1" /> |
| 7 | <!-- 圆角的半径 --> | 7 | <!-- 圆角的半径 --> |
| 8 | - <corners android:radius="@dimen/px2dp_10" /> | 8 | + <corners android:radius="@dimen/px10dp" /> |
| 9 | </shape> | 9 | </shape> |
C5/app/src/main/res/drawable/red_round_button.xml
C5/app/src/main/res/drawable/yellow_round_button.xml
| @@ -5,5 +5,5 @@ | @@ -5,5 +5,5 @@ | ||
| 5 | <!-- 填充的颜色 --> | 5 | <!-- 填充的颜色 --> |
| 6 | <solid android:color="@color/yellow" /> | 6 | <solid android:color="@color/yellow" /> |
| 7 | <!-- 圆角的半径 --> | 7 | <!-- 圆角的半径 --> |
| 8 | - <corners android:radius="@dimen/px2dp_10" /> | 8 | + <corners android:radius="@dimen/px10dp" /> |
| 9 | </shape> | 9 | </shape> |
C5/app/src/main/res/layout/fragment_election.xml
| @@ -32,17 +32,18 @@ | @@ -32,17 +32,18 @@ | ||
| 32 | android:layout_width="wrap_content" | 32 | android:layout_width="wrap_content" |
| 33 | android:layout_height="wrap_content" | 33 | android:layout_height="wrap_content" |
| 34 | android:layout_marginRight="20dp" | 34 | android:layout_marginRight="20dp" |
| 35 | + android:textColor="@color/white" | ||
| 35 | android:text="" | 36 | android:text="" |
| 36 | android:textSize="@dimen/big_text_p5" /> | 37 | android:textSize="@dimen/big_text_p5" /> |
| 37 | 38 | ||
| 38 | <Button | 39 | <Button |
| 39 | android:id="@+id/list_election_item_add_btn" | 40 | android:id="@+id/list_election_item_add_btn" |
| 40 | - android:layout_width="@dimen/px2dp_320" | ||
| 41 | - android:layout_height="@dimen/px2dp_90" | 41 | + android:layout_width="@dimen/px320dp" |
| 42 | + android:layout_height="@dimen/px100dp" | ||
| 42 | android:background="@drawable/agree_selector" | 43 | android:background="@drawable/agree_selector" |
| 43 | android:text="@string/select_other" | 44 | android:text="@string/select_other" |
| 44 | android:textColor="@color/white" | 45 | android:textColor="@color/white" |
| 45 | - android:layout_marginRight="@dimen/px2dp_206" | 46 | + android:layout_marginRight="@dimen/px40dp" |
| 46 | android:textSize="@dimen/big_text_p5" /> | 47 | android:textSize="@dimen/big_text_p5" /> |
| 47 | 48 | ||
| 48 | </LinearLayout> | 49 | </LinearLayout> |
| @@ -100,7 +101,7 @@ | @@ -100,7 +101,7 @@ | ||
| 100 | <RelativeLayout | 101 | <RelativeLayout |
| 101 | android:id="@+id/election_pannal_bottom" | 102 | android:id="@+id/election_pannal_bottom" |
| 102 | android:layout_width="match_parent" | 103 | android:layout_width="match_parent" |
| 103 | - android:layout_height="@dimen/px2dp_138" | 104 | + android:layout_height="@dimen/px138dp" |
| 104 | android:layout_alignParentBottom="true" | 105 | android:layout_alignParentBottom="true" |
| 105 | android:alpha="0.9" | 106 | android:alpha="0.9" |
| 106 | android:background="@drawable/gray_alpha" | 107 | android:background="@drawable/gray_alpha" |
| @@ -108,26 +109,26 @@ | @@ -108,26 +109,26 @@ | ||
| 108 | 109 | ||
| 109 | <Button | 110 | <Button |
| 110 | android:id="@+id/election_btn_confirm" | 111 | android:id="@+id/election_btn_confirm" |
| 111 | - android:layout_width="@dimen/px2dp_420" | ||
| 112 | - android:layout_height="@dimen/px2dp_110" | 112 | + android:layout_width="@dimen/px420dp" |
| 113 | + android:layout_height="@dimen/px110dp" | ||
| 113 | android:layout_centerInParent="true" | 114 | android:layout_centerInParent="true" |
| 114 | android:layout_marginRight="@dimen/content_margin" | 115 | android:layout_marginRight="@dimen/content_margin" |
| 115 | android:background="@drawable/oppos_selector" | 116 | android:background="@drawable/oppos_selector" |
| 116 | android:text="@string/confirm_submit" | 117 | android:text="@string/confirm_submit" |
| 117 | android:textColor="@color/white" | 118 | android:textColor="@color/white" |
| 118 | - android:textSize="@dimen/px2sp_60" | 119 | + android:textSize="@dimen/px60dp" |
| 119 | android:textStyle="bold" /> | 120 | android:textStyle="bold" /> |
| 120 | 121 | ||
| 121 | <Button | 122 | <Button |
| 122 | android:id="@+id/election_btn_modify" | 123 | android:id="@+id/election_btn_modify" |
| 123 | - android:layout_width="@dimen/px2dp_420" | ||
| 124 | - android:layout_height="@dimen/px2dp_110" | 124 | + android:layout_width="@dimen/px420dp" |
| 125 | + android:layout_height="@dimen/px110dp" | ||
| 125 | android:layout_centerInParent="true" | 126 | android:layout_centerInParent="true" |
| 126 | android:layout_marginRight="@dimen/content_margin" | 127 | android:layout_marginRight="@dimen/content_margin" |
| 127 | android:background="@drawable/signin_selector" | 128 | android:background="@drawable/signin_selector" |
| 128 | android:text="@string/modify" | 129 | android:text="@string/modify" |
| 129 | android:textColor="@color/white" | 130 | android:textColor="@color/white" |
| 130 | - android:textSize="@dimen/px2sp_60" | 131 | + android:textSize="@dimen/px60dp" |
| 131 | android:textStyle="bold" | 132 | android:textStyle="bold" |
| 132 | android:visibility="invisible" /> | 133 | android:visibility="invisible" /> |
| 133 | </RelativeLayout> | 134 | </RelativeLayout> |
| @@ -164,33 +165,39 @@ | @@ -164,33 +165,39 @@ | ||
| 164 | android:textColor="@color/red" | 165 | android:textColor="@color/red" |
| 165 | android:textSize="@dimen/big_text_p6" /> | 166 | android:textSize="@dimen/big_text_p6" /> |
| 166 | 167 | ||
| 167 | - <TextView | 168 | + <LinearLayout |
| 168 | android:layout_width="wrap_content" | 169 | android:layout_width="wrap_content" |
| 169 | - android:layout_height="wrap_content" | ||
| 170 | - android:layout_gravity="center_vertical" | ||
| 171 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 172 | - android:text="@string/agree" | ||
| 173 | - android:textColor="@color/red" | ||
| 174 | - android:textSize="@dimen/big_text_p6" /> | 170 | + android:layout_height="match_parent" |
| 171 | + android:orientation="horizontal" | ||
| 172 | + android:gravity="center|center_vertical"> | ||
| 173 | + <TextView | ||
| 174 | + android:layout_width="wrap_content" | ||
| 175 | + android:layout_height="wrap_content" | ||
| 176 | + android:layout_gravity="center_vertical" | ||
| 177 | + android:text="@string/agree" | ||
| 178 | + android:textColor="@color/red" | ||
| 179 | + android:textSize="@dimen/big_text_p6" /> | ||
| 175 | 180 | ||
| 176 | - <TextView | ||
| 177 | - android:layout_width="wrap_content" | ||
| 178 | - android:layout_height="wrap_content" | ||
| 179 | - android:layout_gravity="center_vertical" | ||
| 180 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 181 | - android:text="@string/oppose" | ||
| 182 | - android:textColor="@color/red" | ||
| 183 | - android:textSize="@dimen/big_text_p6" /> | 181 | + <TextView |
| 182 | + android:layout_width="wrap_content" | ||
| 183 | + android:layout_height="wrap_content" | ||
| 184 | + android:layout_gravity="center_vertical" | ||
| 185 | + android:layout_marginLeft="@dimen/button_to_content" | ||
| 186 | + android:text="@string/oppose" | ||
| 187 | + android:textColor="@color/red" | ||
| 188 | + android:textSize="@dimen/big_text_p6" /> | ||
| 184 | 189 | ||
| 185 | - <TextView | ||
| 186 | - android:layout_width="wrap_content" | ||
| 187 | - android:layout_height="wrap_content" | ||
| 188 | - android:layout_gravity="center_vertical" | ||
| 189 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 190 | - android:text="@string/delete" | ||
| 191 | - android:textColor="@color/red" | ||
| 192 | - android:textSize="@dimen/big_text_p6" | ||
| 193 | - android:visibility="gone" /> | 190 | + <TextView |
| 191 | + android:layout_width="wrap_content" | ||
| 192 | + android:layout_height="wrap_content" | ||
| 193 | + android:layout_gravity="center_vertical" | ||
| 194 | + android:layout_marginLeft="@dimen/button_to_content" | ||
| 195 | + android:text="@string/delete" | ||
| 196 | + android:textColor="@color/red" | ||
| 197 | + android:textSize="@dimen/big_text_p6" | ||
| 198 | + android:visibility="gone" /> | ||
| 199 | + | ||
| 200 | + </LinearLayout> | ||
| 194 | 201 | ||
| 195 | </LinearLayout> | 202 | </LinearLayout> |
| 196 | 203 | ||
| @@ -259,23 +266,26 @@ | @@ -259,23 +266,26 @@ | ||
| 259 | 266 | ||
| 260 | <LinearLayout | 267 | <LinearLayout |
| 261 | android:id="@+id/name_layout" | 268 | android:id="@+id/name_layout" |
| 262 | - android:layout_width="wrap_content" | ||
| 263 | - android:layout_height="wrap_content" | ||
| 264 | - android:layout_marginLeft="20dp" | ||
| 265 | - android:layout_marginTop="20dp" | ||
| 266 | - android:orientation="horizontal"> | 269 | + android:layout_width="match_parent" |
| 270 | + android:layout_height="match_parent" | ||
| 271 | + android:layout_marginLeft="@dimen/px20dp" | ||
| 272 | + android:layout_above="@+id/bottom_linear" | ||
| 273 | + android:layout_margin="@dimen/px20dp" | ||
| 274 | + android:gravity="bottom|center" | ||
| 275 | + android:orientation="vertical"> | ||
| 267 | 276 | ||
| 268 | <TextView | 277 | <TextView |
| 269 | android:layout_width="wrap_content" | 278 | android:layout_width="wrap_content" |
| 270 | - android:layout_height="60dp" | 279 | + android:layout_height="@dimen/px120dp" |
| 271 | android:text="@string/input_other" | 280 | android:text="@string/input_other" |
| 272 | - android:textColor="@color/gray" | ||
| 273 | - android:textSize="@dimen/big_text_p5" /> | 281 | + android:layout_marginRight="@dimen/px90dp" |
| 282 | + android:textColor="@color/black" | ||
| 283 | + android:textSize="@dimen/px60dp" /> | ||
| 274 | 284 | ||
| 275 | <com.sunvote.xpadapp.base.ZanyEditText | 285 | <com.sunvote.xpadapp.base.ZanyEditText |
| 276 | android:id="@+id/election_add_edit" | 286 | android:id="@+id/election_add_edit" |
| 277 | - android:layout_width="200dp" | ||
| 278 | - android:layout_height="60dp" | 287 | + android:layout_width="@dimen/px787dp" |
| 288 | + android:layout_height="@dimen/px120dp" | ||
| 279 | android:layout_marginLeft="20dp" | 289 | android:layout_marginLeft="20dp" |
| 280 | android:background="@color/white" | 290 | android:background="@color/white" |
| 281 | android:imeOptions="flagNoExtractUi" | 291 | android:imeOptions="flagNoExtractUi" |
| @@ -290,27 +300,28 @@ | @@ -290,27 +300,28 @@ | ||
| 290 | android:layout_height="wrap_content" | 300 | android:layout_height="wrap_content" |
| 291 | android:layout_alignParentBottom="true" | 301 | android:layout_alignParentBottom="true" |
| 292 | android:layout_centerHorizontal="true" | 302 | android:layout_centerHorizontal="true" |
| 293 | - android:layout_marginBottom="20dp" | 303 | + android:layout_marginBottom="@dimen/px300dp" |
| 304 | + android:layout_marginTop="@dimen/px30dp" | ||
| 294 | android:orientation="horizontal"> | 305 | android:orientation="horizontal"> |
| 295 | 306 | ||
| 296 | <Button | 307 | <Button |
| 297 | - android:id="@+id/election_add_edit_btn_cancel" | ||
| 298 | - android:layout_width="@dimen/button_width" | ||
| 299 | - android:layout_height="@dimen/button_heigh" | ||
| 300 | - android:layout_marginRight="80dp" | ||
| 301 | - android:background="@drawable/oppos_selector" | ||
| 302 | - android:text="@string/cancel" | 308 | + android:id="@+id/election_add_edit_btn_ok" |
| 309 | + android:layout_width="@dimen/px360dp" | ||
| 310 | + android:layout_height="@dimen/px120dp" | ||
| 311 | + android:layout_marginLeft="@dimen/px67dp" | ||
| 312 | + android:background="@drawable/btn_agree" | ||
| 313 | + android:text="@string/ok" | ||
| 303 | android:textColor="@color/white" | 314 | android:textColor="@color/white" |
| 304 | android:textSize="@dimen/big_text_p4" | 315 | android:textSize="@dimen/big_text_p4" |
| 305 | android:textStyle="bold" /> | 316 | android:textStyle="bold" /> |
| 306 | 317 | ||
| 307 | <Button | 318 | <Button |
| 308 | - android:id="@+id/election_add_edit_btn_ok" | ||
| 309 | - android:layout_width="@dimen/button_width" | ||
| 310 | - android:layout_height="@dimen/button_heigh" | ||
| 311 | - android:layout_marginLeft="80dp" | ||
| 312 | - android:background="@drawable/btn_agree" | ||
| 313 | - android:text="@string/ok" | 319 | + android:id="@+id/election_add_edit_btn_cancel" |
| 320 | + android:layout_width="@dimen/px360dp" | ||
| 321 | + android:layout_height="@dimen/px120dp" | ||
| 322 | + android:background="@drawable/oppos_selector" | ||
| 323 | + android:layout_marginLeft="@dimen/px90dp" | ||
| 324 | + android:text="@string/cancel" | ||
| 314 | android:textColor="@color/white" | 325 | android:textColor="@color/white" |
| 315 | android:textSize="@dimen/big_text_p4" | 326 | android:textSize="@dimen/big_text_p4" |
| 316 | android:textStyle="bold" /> | 327 | android:textStyle="bold" /> |
| @@ -320,10 +331,10 @@ | @@ -320,10 +331,10 @@ | ||
| 320 | android:layout_width="match_parent" | 331 | android:layout_width="match_parent" |
| 321 | android:layout_height="match_parent" | 332 | android:layout_height="match_parent" |
| 322 | android:layout_below="@id/name_layout" | 333 | android:layout_below="@id/name_layout" |
| 323 | - android:layout_above="@id/bottom_linear" | ||
| 324 | android:layout_margin="20dp" | 334 | android:layout_margin="20dp" |
| 325 | android:background="@color/white" | 335 | android:background="@color/white" |
| 326 | android:gravity="center" | 336 | android:gravity="center" |
| 337 | + android:visibility="invisible" | ||
| 327 | android:orientation="vertical"> | 338 | android:orientation="vertical"> |
| 328 | 339 | ||
| 329 | <TextView | 340 | <TextView |
| @@ -334,27 +345,26 @@ | @@ -334,27 +345,26 @@ | ||
| 334 | android:textSize="@dimen/big_text_p5" | 345 | android:textSize="@dimen/big_text_p5" |
| 335 | android:textColor="@color/darkgrey"/> | 346 | android:textColor="@color/darkgrey"/> |
| 336 | 347 | ||
| 337 | - <com.sunvote.xpadapp.base.PaletteView | ||
| 338 | - android:id="@+id/draw_view" | ||
| 339 | - android:layout_width="match_parent" | ||
| 340 | - android:layout_height="match_parent" /> | ||
| 341 | - | ||
| 342 | - <ImageView | ||
| 343 | - android:id="@+id/clear_img" | ||
| 344 | - android:layout_width="wrap_content" | ||
| 345 | - android:layout_height="wrap_content" | ||
| 346 | - android:layout_alignParentRight="true" | ||
| 347 | - android:layout_alignParentTop="true" | ||
| 348 | - android:layout_marginTop="20dp" | ||
| 349 | - android:layout_marginRight="20dp" | ||
| 350 | - android:src="@drawable/ic_clear" /> | ||
| 351 | - | ||
| 352 | - </RelativeLayout> | 348 | + <com.sunvote.xpadapp.base.PaletteView |
| 349 | + android:id="@+id/draw_view" | ||
| 350 | + android:layout_width="match_parent" | ||
| 351 | + android:layout_height="match_parent" /> | ||
| 353 | 352 | ||
| 353 | + <ImageView | ||
| 354 | + android:id="@+id/clear_img" | ||
| 355 | + android:layout_width="wrap_content" | ||
| 356 | + android:layout_height="wrap_content" | ||
| 357 | + android:layout_alignParentRight="true" | ||
| 358 | + android:layout_alignParentTop="true" | ||
| 359 | + android:layout_marginTop="20dp" | ||
| 360 | + android:layout_marginRight="20dp" | ||
| 361 | + android:src="@drawable/ic_clear" /> | ||
| 354 | 362 | ||
| 363 | + </RelativeLayout> | ||
| 355 | 364 | ||
| 356 | </RelativeLayout> | 365 | </RelativeLayout> |
| 357 | 366 | ||
| 367 | + | ||
| 358 | <RelativeLayout | 368 | <RelativeLayout |
| 359 | android:id="@+id/singlevote_confirm_panel" | 369 | android:id="@+id/singlevote_confirm_panel" |
| 360 | android:layout_width="fill_parent" | 370 | android:layout_width="fill_parent" |
C5/app/src/main/res/layout/list_election_item.xml
| @@ -3,11 +3,12 @@ | @@ -3,11 +3,12 @@ | ||
| 3 | android:layout_width="match_parent" | 3 | android:layout_width="match_parent" |
| 4 | android:layout_height="@dimen/button_heigh" > | 4 | android:layout_height="@dimen/button_heigh" > |
| 5 | 5 | ||
| 6 | - <LinearLayout | 6 | + <!-- <LinearLayout |
| 7 | android:layout_width="fill_parent" | 7 | android:layout_width="fill_parent" |
| 8 | android:layout_height="fill_parent" | 8 | android:layout_height="fill_parent" |
| 9 | android:background="@color/white" | 9 | android:background="@color/white" |
| 10 | - android:orientation="horizontal"> | 10 | + android:orientation="horizontal" |
| 11 | + android:paddingRight="100dp"> | ||
| 11 | 12 | ||
| 12 | <TextView | 13 | <TextView |
| 13 | android:id="@+id/seq" | 14 | android:id="@+id/seq" |
| @@ -80,8 +81,79 @@ | @@ -80,8 +81,79 @@ | ||
| 80 | android:layout_height="@dimen/button_heigh" | 81 | android:layout_height="@dimen/button_heigh" |
| 81 | android:scaleType="fitXY" | 82 | android:scaleType="fitXY" |
| 82 | android:layout_margin="2dp" | 83 | android:layout_margin="2dp" |
| 83 | - android:layout_toRightOf="@+id/list_election_item_radio_group" />/> | ||
| 84 | - | 84 | + android:visibility="gone" |
| 85 | + android:layout_toRightOf="@+id/list_election_item_radio_group" /> | ||
| 85 | </LinearLayout> | 86 | </LinearLayout> |
| 87 | +--> | ||
| 88 | + | ||
| 89 | + <LinearLayout | ||
| 90 | + android:id="@+id/title_layout" | ||
| 91 | + android:layout_width="fill_parent" | ||
| 92 | + android:layout_height="60dp" | ||
| 93 | + android:layout_below="@id/election_pannal_OX" | ||
| 94 | + android:background="@color/white" | ||
| 95 | + android:orientation="horizontal" | ||
| 96 | + android:paddingRight="100dp"> | ||
| 97 | + | ||
| 98 | + <TextView | ||
| 99 | + android:id="@+id/seq" | ||
| 100 | + android:layout_width="120dp" | ||
| 101 | + android:layout_height="wrap_content" | ||
| 102 | + android:layout_marginLeft="150dp" | ||
| 103 | + android:gravity="center" | ||
| 104 | + android:layout_gravity="center_vertical" | ||
| 105 | + android:text="1" | ||
| 106 | + android:textColor="@color/gray" | ||
| 107 | + android:textSize="@dimen/big_text_p5" /> | ||
| 108 | + | ||
| 109 | + <TextView | ||
| 110 | + android:id="@+id/list_election_item_name" | ||
| 111 | + android:layout_width="0dp" | ||
| 112 | + android:layout_height="wrap_content" | ||
| 113 | + android:layout_gravity="center_vertical" | ||
| 114 | + android:layout_weight="1" | ||
| 115 | + android:layout_marginLeft="40dp" | ||
| 116 | + android:gravity="left|center_vertical" | ||
| 117 | + android:text="" | ||
| 118 | + android:textColor="@color/black" | ||
| 119 | + android:textSize="@dimen/big_text_p5" /> | ||
| 86 | 120 | ||
| 121 | + <RadioGroup | ||
| 122 | + android:id="@+id/list_election_item_radio_group" | ||
| 123 | + android:layout_width="wrap_content" | ||
| 124 | + android:layout_height="wrap_content" | ||
| 125 | + android:layout_gravity="center_vertical" | ||
| 126 | + android:orientation="horizontal" > | ||
| 127 | + | ||
| 128 | + <RadioButton | ||
| 129 | + android:id="@+id/list_election_item_oo" | ||
| 130 | + android:layout_width="@dimen/px60dp" | ||
| 131 | + android:layout_height="@dimen/px63dp" | ||
| 132 | + android:layout_centerVertical="true" | ||
| 133 | + android:layout_marginTop="@dimen/inner_button_margin" | ||
| 134 | + android:layout_marginRight="@dimen/px180dp" | ||
| 135 | + android:button="@null" | ||
| 136 | + android:background="@drawable/oo_selector" | ||
| 137 | + android:visibility="visible" /> | ||
| 138 | + | ||
| 139 | + <RadioButton | ||
| 140 | + android:id="@+id/list_election_item_xx" | ||
| 141 | + android:layout_width="@dimen/px60dp" | ||
| 142 | + android:layout_height="@dimen/px63dp" | ||
| 143 | + android:layout_centerVertical="true" | ||
| 144 | + android:layout_marginTop="@dimen/inner_button_margin" | ||
| 145 | + android:button="@null" | ||
| 146 | + android:background="@drawable/xx_selector"/> | ||
| 147 | + | ||
| 148 | + <RadioButton | ||
| 149 | + android:id="@+id/list_election_item_del" | ||
| 150 | + android:layout_width="@dimen/px60dp" | ||
| 151 | + android:layout_height="@dimen/px63dp" | ||
| 152 | + android:layout_centerVertical="true" | ||
| 153 | + android:visibility="invisible" | ||
| 154 | + android:layout_marginTop="@dimen/inner_button_margin" | ||
| 155 | + android:button="@null" | ||
| 156 | + android:background="@drawable/delete"/> | ||
| 157 | + </RadioGroup> | ||
| 158 | + </LinearLayout> | ||
| 87 | </RelativeLayout> | 159 | </RelativeLayout> |
| 88 | \ No newline at end of file | 160 | \ No newline at end of file |