Commit 355448653fc6c039bcb343147f03420f944cafe9
1 parent
75386c29
选举bug 修复
Showing
8 changed files
with
210 additions
and
255 deletions
C5/app/src/main/AndroidManifest.xml
| @@ -39,7 +39,6 @@ | @@ -39,7 +39,6 @@ | ||
| 39 | android:allowBackup="true" | 39 | android:allowBackup="true" |
| 40 | android:icon="@drawable/ic_launcher" | 40 | android:icon="@drawable/ic_launcher" |
| 41 | android:label="@string/app_name" | 41 | android:label="@string/app_name" |
| 42 | - android:theme="@style/AppTheme" | ||
| 43 | tools:replace="android:name"> | 42 | tools:replace="android:name"> |
| 44 | <provider | 43 | <provider |
| 45 | android:name="android.support.v4.content.FileProvider" | 44 | android:name="android.support.v4.content.FileProvider" |
C5/app/src/main/java/com/sunvote/xpadapp/MainActivity.java
| @@ -1142,10 +1142,6 @@ public class MainActivity extends BaseActivity implements ComListener { | @@ -1142,10 +1142,6 @@ public class MainActivity extends BaseActivity implements ComListener { | ||
| 1142 | } | 1142 | } |
| 1143 | 1143 | ||
| 1144 | private void setElectionVoteFragment(VoteInfo vote) { | 1144 | private void setElectionVoteFragment(VoteInfo vote) { |
| 1145 | - /* meetingId=1; | ||
| 1146 | - if (dbm == null || !dbm.checkDB() || dbm.confId != meetingId) { | ||
| 1147 | - dbm = new DBManager(this, meetingId);// 如果没打开,则打开数据库 | ||
| 1148 | - }*/ | ||
| 1149 | if (dbm == null) { | 1145 | if (dbm == null) { |
| 1150 | Toast.makeText(this, "请先开始会议", Toast.LENGTH_LONG).show(); | 1146 | Toast.makeText(this, "请先开始会议", Toast.LENGTH_LONG).show(); |
| 1151 | return; | 1147 | return; |
C5/app/src/main/java/com/sunvote/xpadapp/db/DBManager.java
| @@ -302,12 +302,6 @@ public class DBManager { | @@ -302,12 +302,6 @@ public class DBManager { | ||
| 302 | it.startVote = false; | 302 | it.startVote = false; |
| 303 | titleList.add(it); | 303 | titleList.add(it); |
| 304 | } | 304 | } |
| 305 | - | ||
| 306 | - MultiTitleItem it = new MultiTitleItem(); | ||
| 307 | - it.result = 0; | ||
| 308 | - it.No = 0; | ||
| 309 | - it.startVote = false; | ||
| 310 | - titleList.add(it); // 另选他人 | ||
| 311 | } catch (Exception e) { | 305 | } catch (Exception e) { |
| 312 | LogUtil.e(TAG,e); | 306 | LogUtil.e(TAG,e); |
| 313 | } finally { | 307 | } finally { |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionCustomFragment.java
| @@ -2,6 +2,7 @@ package com.sunvote.xpadapp.fragments; | @@ -2,6 +2,7 @@ package com.sunvote.xpadapp.fragments; | ||
| 2 | 2 | ||
| 3 | import android.annotation.SuppressLint; | 3 | import android.annotation.SuppressLint; |
| 4 | import android.content.Context; | 4 | import android.content.Context; |
| 5 | +import android.graphics.Color; | ||
| 5 | import android.os.Bundle; | 6 | import android.os.Bundle; |
| 6 | import android.util.Log; | 7 | import android.util.Log; |
| 7 | import android.view.LayoutInflater; | 8 | import android.view.LayoutInflater; |
| @@ -33,13 +34,13 @@ public class ElectionCustomFragment extends BaseFragment { | @@ -33,13 +34,13 @@ public class ElectionCustomFragment extends BaseFragment { | ||
| 33 | private ArrayList<MultiTitleItem> aryContent = null; | 34 | private ArrayList<MultiTitleItem> aryContent = null; |
| 34 | 35 | ||
| 35 | //标题,标题选举信息,提示信息,结果,页码 | 36 | //标题,标题选举信息,提示信息,结果,页码 |
| 36 | - private TextView tvTitle,tvTitleInfo,tvTipInfo,tvResult,tvPage; | 37 | + private TextView tvTitle,tvTitleInfo,tvTipInfo,tvResult; |
| 37 | private ListView listview; | 38 | private ListView listview; |
| 38 | private Button btnConfirm; | 39 | private Button btnConfirm; |
| 39 | private Button btnModify; | 40 | private Button btnModify; |
| 40 | - private Button btnPageUp; | ||
| 41 | - private Button btnPageDown; | ||
| 42 | - private Button btnPageLast; | 41 | + private View btnPageUp; |
| 42 | + private View btnPageDown; | ||
| 43 | + private View btnPageLast; | ||
| 43 | private Button btnConfirmOK; | 44 | private Button btnConfirmOK; |
| 44 | private Button btnConfirmCancel; | 45 | private Button btnConfirmCancel; |
| 45 | //分页 | 46 | //分页 |
| @@ -85,7 +86,6 @@ public class ElectionCustomFragment extends BaseFragment { | @@ -85,7 +86,6 @@ public class ElectionCustomFragment extends BaseFragment { | ||
| 85 | mAdapter = new MyAdapter(getActivity()); | 86 | mAdapter = new MyAdapter(getActivity()); |
| 86 | listview.setAdapter(mAdapter); | 87 | listview.setAdapter(mAdapter); |
| 87 | //显示页 | 88 | //显示页 |
| 88 | - tvPage.setText(page + "/" + totalPage); | ||
| 89 | if(voteInfo!=null){ | 89 | if(voteInfo!=null){ |
| 90 | tvTitle.setText(bill.title); | 90 | tvTitle.setText(bill.title); |
| 91 | showVote(); | 91 | showVote(); |
| @@ -135,7 +135,6 @@ public class ElectionCustomFragment extends BaseFragment { | @@ -135,7 +135,6 @@ public class ElectionCustomFragment extends BaseFragment { | ||
| 135 | public void onClick(View v) { | 135 | public void onClick(View v) { |
| 136 | page=totalPage; | 136 | page=totalPage; |
| 137 | listview.setSelection(aryContent.size()); | 137 | listview.setSelection(aryContent.size()); |
| 138 | - tvPage.setText(page + "/" + totalPage); | ||
| 139 | } | 138 | } |
| 140 | }); | 139 | }); |
| 141 | 140 | ||
| @@ -198,10 +197,9 @@ public class ElectionCustomFragment extends BaseFragment { | @@ -198,10 +197,9 @@ public class ElectionCustomFragment extends BaseFragment { | ||
| 198 | tvResult =(TextView) view.findViewById(R.id.singlevote_tv_result); | 197 | tvResult =(TextView) view.findViewById(R.id.singlevote_tv_result); |
| 199 | confirm_panel = (RelativeLayout) view.findViewById(R.id.singlevote_confirm_panel); | 198 | confirm_panel = (RelativeLayout) view.findViewById(R.id.singlevote_confirm_panel); |
| 200 | 199 | ||
| 201 | - tvPage = (TextView) view.findViewById(R.id.election_page); | ||
| 202 | - btnPageUp = (Button) view.findViewById(R.id.election_pageup); | ||
| 203 | - btnPageDown = (Button) view.findViewById(R.id.election_pagedown); | ||
| 204 | - btnPageLast = (Button) view.findViewById(R.id.election_pagelast); | 200 | + btnPageUp = view.findViewById(R.id.election_pageup); |
| 201 | + btnPageDown = view.findViewById(R.id.election_pagedown); | ||
| 202 | + btnPageLast = view.findViewById(R.id.election_pagelast); | ||
| 205 | 203 | ||
| 206 | btnConfirm = (Button) view.findViewById(R.id.election_btn_confirm); | 204 | btnConfirm = (Button) view.findViewById(R.id.election_btn_confirm); |
| 207 | btnModify = (Button)view.findViewById(R.id.election_btn_modify); | 205 | btnModify = (Button)view.findViewById(R.id.election_btn_modify); |
| @@ -370,6 +368,7 @@ public class ElectionCustomFragment extends BaseFragment { | @@ -370,6 +368,7 @@ public class ElectionCustomFragment extends BaseFragment { | ||
| 370 | } else { | 368 | } else { |
| 371 | holder = (ViewHolder) convertView.getTag(); | 369 | holder = (ViewHolder) convertView.getTag(); |
| 372 | } | 370 | } |
| 371 | + convertView.setBackgroundColor(position % 2 == 0 ? Color.WHITE : Color.parseColor("#E5E5E5")); | ||
| 373 | holder.tvNum.setText(String.valueOf(it.No)); | 372 | holder.tvNum.setText(String.valueOf(it.No)); |
| 374 | holder.tvName.setText(String.valueOf(it.title)); | 373 | holder.tvName.setText(String.valueOf(it.title)); |
| 375 | if (it.result == 4) { | 374 | if (it.result == 4) { |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
| @@ -6,7 +6,10 @@ import android.graphics.Bitmap; | @@ -6,7 +6,10 @@ 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.Spannable; | ||
| 10 | +import android.text.SpannableStringBuilder; | ||
| 9 | import android.text.TextUtils; | 11 | import android.text.TextUtils; |
| 12 | +import android.text.style.AbsoluteSizeSpan; | ||
| 10 | import android.util.Log; | 13 | import android.util.Log; |
| 11 | import android.view.KeyEvent; | 14 | import android.view.KeyEvent; |
| 12 | import android.view.LayoutInflater; | 15 | import android.view.LayoutInflater; |
| @@ -45,6 +48,8 @@ import java.text.SimpleDateFormat; | @@ -45,6 +48,8 @@ import java.text.SimpleDateFormat; | ||
| 45 | import java.util.ArrayList; | 48 | import java.util.ArrayList; |
| 46 | import java.util.Date; | 49 | import java.util.Date; |
| 47 | 50 | ||
| 51 | +import static com.sunvote.xpadapp.utils.MyStringUtil.replaceBlank; | ||
| 52 | + | ||
| 48 | public class ElectionFragment extends BaseFragment { | 53 | public class ElectionFragment extends BaseFragment { |
| 49 | private String TAG = "ElectionFragment"; | 54 | private String TAG = "ElectionFragment"; |
| 50 | private ArrayList<MultiTitleItem> aryContent = null; | 55 | private ArrayList<MultiTitleItem> aryContent = null; |
| @@ -85,6 +90,7 @@ public class ElectionFragment extends BaseFragment { | @@ -85,6 +90,7 @@ public class ElectionFragment extends BaseFragment { | ||
| 85 | private String[] options; | 90 | private String[] options; |
| 86 | private ImageButton btn_all_ok,btn_all_xx; | 91 | private ImageButton btn_all_ok,btn_all_xx; |
| 87 | private TextView tv_all_ok,tv_all_xx; | 92 | private TextView tv_all_ok,tv_all_xx; |
| 93 | + private View list_election_item_add_btn; | ||
| 88 | private boolean isAllO = false; | 94 | private boolean isAllO = false; |
| 89 | private boolean isAllX = false; | 95 | private boolean isAllX = false; |
| 90 | private StringBuilder voteNameStr = new StringBuilder(""); | 96 | private StringBuilder voteNameStr = new StringBuilder(""); |
| @@ -126,8 +132,8 @@ public class ElectionFragment extends BaseFragment { | @@ -126,8 +132,8 @@ public class ElectionFragment extends BaseFragment { | ||
| 126 | listview.setAdapter(mAdapter); | 132 | listview.setAdapter(mAdapter); |
| 127 | 133 | ||
| 128 | tvTitle = (TextView) view.findViewById(R.id.election_title); | 134 | tvTitle = (TextView) view.findViewById(R.id.election_title); |
| 129 | - int houxuan = aryContent.size()-1; | ||
| 130 | drawView = (PaletteView) view.findViewById(R.id.draw_view); | 135 | drawView = (PaletteView) view.findViewById(R.id.draw_view); |
| 136 | + list_election_item_add_btn = view.findViewById(R.id.list_election_item_add_btn); | ||
| 131 | imgClear = (ImageView) view.findViewById(R.id.clear_img); | 137 | imgClear = (ImageView) view.findViewById(R.id.clear_img); |
| 132 | tvInfo = (TextView) view.findViewById(R.id.election_info); | 138 | tvInfo = (TextView) view.findViewById(R.id.election_info); |
| 133 | bottomLayout = (RelativeLayout) view.findViewById(R.id.election_pannal_bottom); | 139 | bottomLayout = (RelativeLayout) view.findViewById(R.id.election_pannal_bottom); |
| @@ -140,6 +146,17 @@ public class ElectionFragment extends BaseFragment { | @@ -140,6 +146,17 @@ public class ElectionFragment extends BaseFragment { | ||
| 140 | btn_all_ok =(ImageButton) view.findViewById(R.id.btn_all_ok); | 146 | btn_all_ok =(ImageButton) view.findViewById(R.id.btn_all_ok); |
| 141 | btn_all_xx=(ImageButton) view.findViewById(R.id.btn_all_xx); | 147 | btn_all_xx=(ImageButton) view.findViewById(R.id.btn_all_xx); |
| 142 | View btnPageLast = view.findViewById(R.id.election_pagelast); | 148 | View btnPageLast = view.findViewById(R.id.election_pagelast); |
| 149 | + list_election_item_add_btn.setOnClickListener(new OnClickListener() { | ||
| 150 | + @Override | ||
| 151 | + public void onClick(View v) { | ||
| 152 | + if(votedCount>= voteInfo.select ){ | ||
| 153 | + Toast.makeText(getActivity(), getString(R.string.max_select)+voteInfo.select+getString(R.string.person), Toast.LENGTH_SHORT).show(); | ||
| 154 | + return; | ||
| 155 | + } | ||
| 156 | + drawView.clear(); | ||
| 157 | + addOtherLayout.setVisibility(View.VISIBLE); | ||
| 158 | + } | ||
| 159 | + }); | ||
| 143 | addOtherLayout.setOnClickListener(new OnClickListener() { | 160 | addOtherLayout.setOnClickListener(new OnClickListener() { |
| 144 | @Override | 161 | @Override |
| 145 | public void onClick(View v) { | 162 | public void onClick(View v) { |
| @@ -322,13 +339,12 @@ public class ElectionFragment extends BaseFragment { | @@ -322,13 +339,12 @@ public class ElectionFragment extends BaseFragment { | ||
| 322 | voteNameStr.append(strName).append(","); | 339 | voteNameStr.append(strName).append(","); |
| 323 | SharedPreferencesUtil.saveData(getActivity(),strName,getNotePath()); | 340 | SharedPreferencesUtil.saveData(getActivity(),strName,getNotePath()); |
| 324 | drawView.saveScreenShot(getNotePath()); | 341 | drawView.saveScreenShot(getNotePath()); |
| 325 | - Log.d(TAG, "add other" + edtOther.getText().toString()); | ||
| 326 | MultiTitleItem it = new MultiTitleItem(); | 342 | MultiTitleItem it = new MultiTitleItem(); |
| 327 | it.startVote = true; | 343 | it.startVote = true; |
| 328 | it.No = --otherCount; | 344 | it.No = --otherCount; |
| 329 | it.result = 1; | 345 | it.result = 1; |
| 330 | it.title = edtOther.getText().toString(); | 346 | it.title = edtOther.getText().toString(); |
| 331 | - aryContent.add(aryContent.size() - 1, it); | 347 | + aryContent.add(aryContent.size() , it); |
| 332 | mAdapter.notifyDataSetChanged(); | 348 | mAdapter.notifyDataSetChanged(); |
| 333 | addOtherLayout.setVisibility(View.GONE); | 349 | addOtherLayout.setVisibility(View.GONE); |
| 334 | checkVoted(); | 350 | checkVoted(); |
| @@ -364,7 +380,11 @@ public class ElectionFragment extends BaseFragment { | @@ -364,7 +380,11 @@ public class ElectionFragment extends BaseFragment { | ||
| 364 | //tvInfo.setText(""); | 380 | //tvInfo.setText(""); |
| 365 | if(voteInfo!=null){ | 381 | if(voteInfo!=null){ |
| 366 | if(voteInfo!=null){ | 382 | if(voteInfo!=null){ |
| 367 | - tvTitle.setText(bill.title); | 383 | + SpannableStringBuilder text1= new SpannableStringBuilder(replaceBlank(bill.title)); |
| 384 | + text1.setSpan(new AbsoluteSizeSpan(70), 0, text1.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); | ||
| 385 | + SpannableStringBuilder text= new SpannableStringBuilder( "(侯选" + aryContent.size() + "人)"); | ||
| 386 | + text.setSpan(new AbsoluteSizeSpan(45), 0, text.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); | ||
| 387 | + tvTitle.setText(text1.append(text)); | ||
| 368 | } | 388 | } |
| 369 | showVote(); | 389 | showVote(); |
| 370 | checkVoted(); | 390 | checkVoted(); |
| @@ -628,43 +648,7 @@ public class ElectionFragment extends BaseFragment { | @@ -628,43 +648,7 @@ public class ElectionFragment extends BaseFragment { | ||
| 628 | 648 | ||
| 629 | Log.v("BaseAdapterTest", "getView " + position + " " + convertView); | 649 | Log.v("BaseAdapterTest", "getView " + position + " " + convertView); |
| 630 | MultiTitleItem it = aryContent.get(position); | 650 | MultiTitleItem it = aryContent.get(position); |
| 631 | - if (position > 0 && position == aryContent.size() - 1) { | ||
| 632 | - convertView = mInflater.inflate(R.layout.list_election_item_add, null); | ||
| 633 | - Button btnAdd = (Button) convertView.findViewById(R.id.list_election_item_add_btn); | ||
| 634 | - int opposeCount=checkOpposeVoted(); | ||
| 635 | - if (it.startVote && voteInfo.other > 0) { | ||
| 636 | - //btnAdd.setEnabled(true); | ||
| 637 | - if(((aryContent.size()-1)- voteInfo.select)<opposeCount){ | ||
| 638 | - btnAdd.setVisibility(View.VISIBLE); | ||
| 639 | - convertView.setVisibility(View.VISIBLE); | ||
| 640 | - }else{ | ||
| 641 | - btnAdd.setVisibility(View.INVISIBLE); | ||
| 642 | - convertView.setVisibility(View.INVISIBLE); | ||
| 643 | - } | ||
| 644 | - } else { | ||
| 645 | - //btnAdd.setEnabled(false); | ||
| 646 | - btnAdd.setVisibility(View.INVISIBLE); | ||
| 647 | - convertView.setVisibility(View.INVISIBLE); | ||
| 648 | - } | ||
| 649 | - btnAdd.setOnClickListener(new OnClickListener() { | ||
| 650 | - @Override | ||
| 651 | - public void onClick(View v) { | ||
| 652 | - Log.d(TAG, "add other"); | ||
| 653 | - if(votedCount>= voteInfo.select ){ | ||
| 654 | - Toast.makeText(getActivity(), getString(R.string.max_select)+voteInfo.select+getString(R.string.person), Toast.LENGTH_SHORT).show(); | ||
| 655 | - return; | ||
| 656 | - } | ||
| 657 | - drawView.clear(); | ||
| 658 | - addOtherLayout.setVisibility(View.VISIBLE); | ||
| 659 | -// edtOther.requestFocus(); | ||
| 660 | -// showInputMethod(edtOther, true, 1500); | ||
| 661 | - | ||
| 662 | - } | ||
| 663 | - }); | ||
| 664 | - return convertView; | ||
| 665 | - } | ||
| 666 | - | ||
| 667 | - if (convertView == null || convertView.findViewById(R.id.list_election_item_add_btn) != null) { | 651 | + if (convertView == null ) { |
| 668 | convertView = mInflater.inflate(R.layout.list_election_item, null); | 652 | convertView = mInflater.inflate(R.layout.list_election_item, null); |
| 669 | holder = new ViewHolder(); | 653 | holder = new ViewHolder(); |
| 670 | holder.tvName = (TextView) convertView.findViewById(R.id.list_election_item_name); | 654 | holder.tvName = (TextView) convertView.findViewById(R.id.list_election_item_name); |
| @@ -674,9 +658,9 @@ public class ElectionFragment extends BaseFragment { | @@ -674,9 +658,9 @@ public class ElectionFragment extends BaseFragment { | ||
| 674 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); | 658 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); |
| 675 | holder.btnDel = (RadioButton) convertView.findViewById(R.id.list_election_item_del); | 659 | holder.btnDel = (RadioButton) convertView.findViewById(R.id.list_election_item_del); |
| 676 | holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); | 660 | holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); |
| 677 | - convertView.setTag(holder); // ��ViewHolder���� | 661 | + convertView.setTag(holder); |
| 678 | } else { | 662 | } else { |
| 679 | - holder = (ViewHolder) convertView.getTag(); // �� | 663 | + holder = (ViewHolder) convertView.getTag(); |
| 680 | } | 664 | } |
| 681 | holder.seq.setText("" + (position+1)); | 665 | holder.seq.setText("" + (position+1)); |
| 682 | holder.tvName.setText(String.valueOf(it.title)); | 666 | holder.tvName.setText(String.valueOf(it.title)); |
| @@ -720,7 +704,6 @@ public class ElectionFragment extends BaseFragment { | @@ -720,7 +704,6 @@ public class ElectionFragment extends BaseFragment { | ||
| 720 | btn_all_ok.setEnabled(true); | 704 | btn_all_ok.setEnabled(true); |
| 721 | } | 705 | } |
| 722 | 706 | ||
| 723 | - /* ΪButton��ӵ���¼� */ | ||
| 724 | holder.btnO.setOnClickListener(new OnClickListener() { | 707 | holder.btnO.setOnClickListener(new OnClickListener() { |
| 725 | @Override | 708 | @Override |
| 726 | public void onClick(View v) { | 709 | public void onClick(View v) { |
| @@ -838,6 +821,12 @@ public class ElectionFragment extends BaseFragment { | @@ -838,6 +821,12 @@ public class ElectionFragment extends BaseFragment { | ||
| 838 | } | 821 | } |
| 839 | mAdapter.notifyDataSetChanged(); | 822 | mAdapter.notifyDataSetChanged(); |
| 840 | listview.invalidate(); | 823 | listview.invalidate(); |
| 824 | + | ||
| 825 | + if((aryContent.size()- voteInfo.select)<checkOpposeVoted()){ | ||
| 826 | + list_election_item_add_btn.setVisibility(View.VISIBLE); | ||
| 827 | + }else{ | ||
| 828 | + list_election_item_add_btn.setVisibility(View.GONE); | ||
| 829 | + } | ||
| 841 | } | 830 | } |
| 842 | 831 | ||
| 843 | private int checkOpposeVoted() { | 832 | private int checkOpposeVoted() { |
C5/app/src/main/res/layout/fragment_custom_election.xml
| @@ -37,18 +37,12 @@ | @@ -37,18 +37,12 @@ | ||
| 37 | 37 | ||
| 38 | </LinearLayout> | 38 | </LinearLayout> |
| 39 | 39 | ||
| 40 | - | ||
| 41 | - | ||
| 42 | - | ||
| 43 | - | ||
| 44 | <RelativeLayout | 40 | <RelativeLayout |
| 45 | android:id="@+id/election_pannal_OX" | 41 | android:id="@+id/election_pannal_OX" |
| 46 | android:layout_width="match_parent" | 42 | android:layout_width="match_parent" |
| 47 | - android:background="@drawable/shapes" | ||
| 48 | - android:layout_marginTop="10dp" | ||
| 49 | - android:layout_height="40dp" | ||
| 50 | - android:layout_marginLeft="20dp" | ||
| 51 | - android:layout_marginRight="20dp" | 43 | + android:layout_height="50dp" |
| 44 | + android:paddingLeft="20dp" | ||
| 45 | + android:paddingRight="20dp" | ||
| 52 | android:layout_below="@+id/line_panel" > | 46 | android:layout_below="@+id/line_panel" > |
| 53 | <TextView | 47 | <TextView |
| 54 | android:id="@+id/tv_num" | 48 | android:id="@+id/tv_num" |
| @@ -58,33 +52,33 @@ | @@ -58,33 +52,33 @@ | ||
| 58 | android:layout_centerVertical="true" | 52 | android:layout_centerVertical="true" |
| 59 | android:gravity="center" | 53 | android:gravity="center" |
| 60 | android:text="序号" | 54 | android:text="序号" |
| 61 | - android:textColor="@color/black" | 55 | + android:textColor="@color/gray" |
| 62 | android:textSize="@dimen/big_text_p5" /> | 56 | android:textSize="@dimen/big_text_p5" /> |
| 63 | 57 | ||
| 64 | - <View | 58 | + <!-- <View |
| 65 | android:id="@+id/view_line" | 59 | android:id="@+id/view_line" |
| 66 | android:layout_width="2px" | 60 | android:layout_width="2px" |
| 67 | android:layout_height="match_parent" | 61 | android:layout_height="match_parent" |
| 68 | android:background="@color/votebakground" | 62 | android:background="@color/votebakground" |
| 69 | - android:layout_toRightOf="@id/tv_num"/> | 63 | + android:layout_toRightOf="@id/tv_num"/>--> |
| 70 | 64 | ||
| 71 | <TextView | 65 | <TextView |
| 72 | android:id="@+id/tv_name" | 66 | android:id="@+id/tv_name" |
| 73 | android:layout_width="400dp" | 67 | android:layout_width="400dp" |
| 74 | android:layout_height="wrap_content" | 68 | android:layout_height="wrap_content" |
| 75 | android:layout_centerVertical="true" | 69 | android:layout_centerVertical="true" |
| 76 | - android:layout_toRightOf="@id/view_line" | 70 | + android:layout_toRightOf="@id/tv_num" |
| 77 | android:gravity="center" | 71 | android:gravity="center" |
| 78 | android:text="项目" | 72 | android:text="项目" |
| 79 | - android:textColor="@color/black" | 73 | + android:textColor="@color/red" |
| 80 | android:textSize="@dimen/big_text_p5" /> | 74 | android:textSize="@dimen/big_text_p5" /> |
| 81 | 75 | ||
| 82 | - <View | 76 | + <!-- <View |
| 83 | android:layout_width="2px" | 77 | android:layout_width="2px" |
| 84 | android:layout_height="match_parent" | 78 | android:layout_height="match_parent" |
| 85 | android:background="@color/votebakground" | 79 | android:background="@color/votebakground" |
| 86 | android:layout_toRightOf="@id/tv_name"/> | 80 | android:layout_toRightOf="@id/tv_name"/> |
| 87 | - | 81 | +--> |
| 88 | <TextView | 82 | <TextView |
| 89 | android:id="@+id/tv_agree" | 83 | android:id="@+id/tv_agree" |
| 90 | android:layout_width="wrap_content" | 84 | android:layout_width="wrap_content" |
| @@ -92,7 +86,7 @@ | @@ -92,7 +86,7 @@ | ||
| 92 | android:gravity="center" | 86 | android:gravity="center" |
| 93 | android:layout_centerVertical="true" | 87 | android:layout_centerVertical="true" |
| 94 | android:text="赞成" | 88 | android:text="赞成" |
| 95 | - android:textColor="@color/black" | 89 | + android:textColor="@color/red" |
| 96 | android:layout_toRightOf="@id/tv_name" | 90 | android:layout_toRightOf="@id/tv_name" |
| 97 | android:layout_marginLeft="50dp" | 91 | android:layout_marginLeft="50dp" |
| 98 | android:textSize="@dimen/big_text_p5" /> | 92 | android:textSize="@dimen/big_text_p5" /> |
| @@ -104,7 +98,7 @@ | @@ -104,7 +98,7 @@ | ||
| 104 | android:gravity="center" | 98 | android:gravity="center" |
| 105 | android:layout_centerVertical="true" | 99 | android:layout_centerVertical="true" |
| 106 | android:text="反对" | 100 | android:text="反对" |
| 107 | - android:textColor="@color/black" | 101 | + android:textColor="@color/red" |
| 108 | android:layout_toRightOf="@id/tv_agree" | 102 | android:layout_toRightOf="@id/tv_agree" |
| 109 | android:layout_marginLeft="40dp" | 103 | android:layout_marginLeft="40dp" |
| 110 | android:textSize="@dimen/big_text_p5" /> | 104 | android:textSize="@dimen/big_text_p5" /> |
| @@ -116,7 +110,7 @@ | @@ -116,7 +110,7 @@ | ||
| 116 | android:gravity="center" | 110 | android:gravity="center" |
| 117 | android:layout_centerVertical="true" | 111 | android:layout_centerVertical="true" |
| 118 | android:text="弃权" | 112 | android:text="弃权" |
| 119 | - android:textColor="@color/black" | 113 | + android:textColor="@color/red" |
| 120 | android:layout_toRightOf="@id/tv_oppose" | 114 | android:layout_toRightOf="@id/tv_oppose" |
| 121 | android:layout_marginLeft="40dp" | 115 | android:layout_marginLeft="40dp" |
| 122 | android:textSize="@dimen/big_text_p5" /> | 116 | android:textSize="@dimen/big_text_p5" /> |
| @@ -130,16 +124,14 @@ | @@ -130,16 +124,14 @@ | ||
| 130 | android:layout_alignParentBottom="true" | 124 | android:layout_alignParentBottom="true" |
| 131 | android:layout_alignParentStart="true" | 125 | android:layout_alignParentStart="true" |
| 132 | android:alpha="0.9" | 126 | android:alpha="0.9" |
| 133 | - android:background="@drawable/gray_alpha" | 127 | + android:background="@color/white" |
| 134 | android:visibility="visible"> | 128 | android:visibility="visible"> |
| 135 | 129 | ||
| 136 | <Button | 130 | <Button |
| 137 | android:id="@+id/election_btn_confirm" | 131 | android:id="@+id/election_btn_confirm" |
| 138 | android:layout_width="wrap_content" | 132 | android:layout_width="wrap_content" |
| 139 | android:layout_height="wrap_content" | 133 | android:layout_height="wrap_content" |
| 140 | - android:layout_alignParentRight="true" | ||
| 141 | - android:layout_centerVertical="true" | ||
| 142 | - android:layout_marginRight="20dp" | 134 | + android:layout_centerInParent="true" |
| 143 | android:background="@drawable/oppos_selector" | 135 | android:background="@drawable/oppos_selector" |
| 144 | android:text="@string/confirm_submit" | 136 | android:text="@string/confirm_submit" |
| 145 | android:textColor="@color/white" | 137 | android:textColor="@color/white" |
| @@ -150,9 +142,7 @@ | @@ -150,9 +142,7 @@ | ||
| 150 | android:id="@+id/election_btn_modify" | 142 | android:id="@+id/election_btn_modify" |
| 151 | android:layout_width="wrap_content" | 143 | android:layout_width="wrap_content" |
| 152 | android:layout_height="wrap_content" | 144 | android:layout_height="wrap_content" |
| 153 | - android:layout_alignParentRight="true" | ||
| 154 | - android:layout_centerVertical="true" | ||
| 155 | - android:layout_marginRight="20dp" | 145 | + android:layout_centerInParent="true" |
| 156 | android:background="@drawable/signin_selector" | 146 | android:background="@drawable/signin_selector" |
| 157 | android:text="@string/modify" | 147 | android:text="@string/modify" |
| 158 | android:textColor="@color/white" | 148 | android:textColor="@color/white" |
| @@ -160,28 +150,6 @@ | @@ -160,28 +150,6 @@ | ||
| 160 | android:textStyle="bold" | 150 | android:textStyle="bold" |
| 161 | android:visibility="invisible" /> | 151 | android:visibility="invisible" /> |
| 162 | 152 | ||
| 163 | - <Button | ||
| 164 | - android:id="@+id/election_pagelast" | ||
| 165 | - android:layout_width="120dp" | ||
| 166 | - android:layout_height="wrap_content" | ||
| 167 | - android:layout_centerVertical="true" | ||
| 168 | - android:layout_toLeftOf="@id/election_btn_confirm" | ||
| 169 | - android:background="@drawable/page_selector" | ||
| 170 | - android:layout_marginRight="20dp" | ||
| 171 | - android:text="最后一页" | ||
| 172 | - android:textSize="@dimen/big_text_p5" /> | ||
| 173 | - | ||
| 174 | - <Button | ||
| 175 | - android:id="@+id/election_pagedown" | ||
| 176 | - android:layout_width="wrap_content" | ||
| 177 | - android:layout_height="wrap_content" | ||
| 178 | - android:layout_centerVertical="true" | ||
| 179 | - android:layout_toLeftOf="@id/election_pagelast" | ||
| 180 | - android:background="@drawable/page_selector" | ||
| 181 | - android:layout_marginRight="20dp" | ||
| 182 | - android:text="@string/page_down" | ||
| 183 | - android:textSize="@dimen/big_text_p5" /> | ||
| 184 | - | ||
| 185 | <TextView | 153 | <TextView |
| 186 | android:id="@+id/tv_tip_info" | 154 | android:id="@+id/tv_tip_info" |
| 187 | android:layout_width="wrap_content" | 155 | android:layout_width="wrap_content" |
| @@ -191,31 +159,6 @@ | @@ -191,31 +159,6 @@ | ||
| 191 | android:text="" | 159 | android:text="" |
| 192 | android:textSize="@dimen/big_text_p4" /> | 160 | android:textSize="@dimen/big_text_p4" /> |
| 193 | 161 | ||
| 194 | - <TextView | ||
| 195 | - android:id="@+id/election_page" | ||
| 196 | - android:layout_width="wrap_content" | ||
| 197 | - android:layout_height="wrap_content" | ||
| 198 | - android:layout_centerInParent="true" | ||
| 199 | - android:layout_marginRight="80dp" | ||
| 200 | - android:text="1/10" | ||
| 201 | - android:textSize="@dimen/big_text_p4" | ||
| 202 | - android:visibility="invisible" /> | ||
| 203 | - | ||
| 204 | - <Button | ||
| 205 | - android:id="@+id/election_pageup" | ||
| 206 | - android:layout_width="wrap_content" | ||
| 207 | - android:layout_height="wrap_content" | ||
| 208 | - android:layout_centerVertical="true" | ||
| 209 | - android:layout_toLeftOf="@id/election_pagedown" | ||
| 210 | - android:background="@drawable/page_selector" | ||
| 211 | - android:text="@string/page_up" | ||
| 212 | - android:layout_marginRight="40dp" | ||
| 213 | - android:textSize="@dimen/big_text_p5" | ||
| 214 | - android:visibility="visible" /> | ||
| 215 | - | ||
| 216 | - | ||
| 217 | - | ||
| 218 | - | ||
| 219 | </RelativeLayout> | 162 | </RelativeLayout> |
| 220 | 163 | ||
| 221 | <ListView | 164 | <ListView |
| @@ -224,11 +167,47 @@ | @@ -224,11 +167,47 @@ | ||
| 224 | android:layout_height="match_parent" | 167 | android:layout_height="match_parent" |
| 225 | android:layout_above="@id/election_pannal_bottom" | 168 | android:layout_above="@id/election_pannal_bottom" |
| 226 | android:layout_below="@id/election_pannal_OX" | 169 | android:layout_below="@id/election_pannal_OX" |
| 227 | - android:layout_marginBottom="2px" | ||
| 228 | - android:layout_marginLeft="20dp" | ||
| 229 | - android:layout_marginRight="20dp" | 170 | + android:layout_marginBottom="1dp" |
| 230 | android:divider="@color/votebakground" | 171 | android:divider="@color/votebakground" |
| 231 | - android:dividerHeight="2px" /> | 172 | + android:background="@color/white" |
| 173 | + android:dividerHeight="1dp" /> | ||
| 174 | + | ||
| 175 | + <LinearLayout | ||
| 176 | + android:layout_width="40dp" | ||
| 177 | + android:layout_height="150dp" | ||
| 178 | + android:layout_alignParentRight="true" | ||
| 179 | + android:layout_centerVertical="true" | ||
| 180 | + android:layout_marginBottom="50dp" | ||
| 181 | + android:layout_marginRight="20dp" | ||
| 182 | + android:layout_marginTop="50dp" | ||
| 183 | + android:background="@drawable/right_control" | ||
| 184 | + android:orientation="vertical"> | ||
| 185 | + | ||
| 186 | + <ImageView | ||
| 187 | + android:id="@+id/election_pageup" | ||
| 188 | + android:layout_width="wrap_content" | ||
| 189 | + android:layout_height="0dp" | ||
| 190 | + android:layout_weight="1" | ||
| 191 | + android:padding="10dp" | ||
| 192 | + android:src="@drawable/page_up" /> | ||
| 193 | + | ||
| 194 | + <ImageView | ||
| 195 | + android:id="@+id/election_pagedown" | ||
| 196 | + android:layout_width="wrap_content" | ||
| 197 | + android:layout_height="0dp" | ||
| 198 | + android:layout_weight="1" | ||
| 199 | + android:padding="10dp" | ||
| 200 | + android:src="@drawable/page_down" /> | ||
| 201 | + | ||
| 202 | + <ImageView | ||
| 203 | + android:id="@+id/election_pagelast" | ||
| 204 | + android:layout_width="wrap_content" | ||
| 205 | + android:layout_height="0dp" | ||
| 206 | + android:layout_weight="1" | ||
| 207 | + android:padding="10dp" | ||
| 208 | + android:src="@drawable/page_frist" /> | ||
| 209 | + | ||
| 210 | + </LinearLayout> | ||
| 232 | 211 | ||
| 233 | <RelativeLayout | 212 | <RelativeLayout |
| 234 | android:id="@+id/singlevote_confirm_panel" | 213 | android:id="@+id/singlevote_confirm_panel" |
| @@ -289,7 +268,7 @@ | @@ -289,7 +268,7 @@ | ||
| 289 | android:textSize="@dimen/big_text_p2" | 268 | android:textSize="@dimen/big_text_p2" |
| 290 | android:textStyle="bold" | 269 | android:textStyle="bold" |
| 291 | android:visibility="invisible" | 270 | android:visibility="invisible" |
| 292 | - android:layout_alignParentRight="true" | 271 | + android:layout_centerInParent="true" |
| 293 | android:layout_marginTop="40dp" | 272 | android:layout_marginTop="40dp" |
| 294 | android:layout_marginRight="40dp"/> | 273 | android:layout_marginRight="40dp"/> |
| 295 | </RelativeLayout> | 274 | </RelativeLayout> |
| 296 | \ No newline at end of file | 275 | \ No newline at end of file |
C5/app/src/main/res/layout/fragment_election.xml
| @@ -31,7 +31,17 @@ | @@ -31,7 +31,17 @@ | ||
| 31 | android:id="@+id/election_info" | 31 | android:id="@+id/election_info" |
| 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:text="" | 35 | android:text="" |
| 36 | + android:textSize="@dimen/big_text_p5" /> | ||
| 37 | + | ||
| 38 | + <Button | ||
| 39 | + android:id="@+id/list_election_item_add_btn" | ||
| 40 | + android:layout_width="120dp" | ||
| 41 | + android:layout_height="50dp" | ||
| 42 | + android:background="@drawable/agree_selector" | ||
| 43 | + android:text="@string/select_other" | ||
| 44 | + android:textColor="@color/white" | ||
| 35 | android:layout_marginRight="20dp" | 45 | android:layout_marginRight="20dp" |
| 36 | android:textSize="@dimen/big_text_p5" /> | 46 | android:textSize="@dimen/big_text_p5" /> |
| 37 | 47 | ||
| @@ -95,6 +105,7 @@ | @@ -95,6 +105,7 @@ | ||
| 95 | android:alpha="0.9" | 105 | android:alpha="0.9" |
| 96 | android:background="@drawable/gray_alpha" | 106 | android:background="@drawable/gray_alpha" |
| 97 | android:visibility="visible"> | 107 | android:visibility="visible"> |
| 108 | + | ||
| 98 | <Button | 109 | <Button |
| 99 | android:id="@+id/election_btn_confirm" | 110 | android:id="@+id/election_btn_confirm" |
| 100 | android:layout_width="@dimen/button_width" | 111 | android:layout_width="@dimen/button_width" |
| @@ -123,20 +134,20 @@ | @@ -123,20 +134,20 @@ | ||
| 123 | 134 | ||
| 124 | <LinearLayout | 135 | <LinearLayout |
| 125 | android:id="@+id/title_layout" | 136 | android:id="@+id/title_layout" |
| 126 | - android:layout_below="@id/election_pannal_OX" | ||
| 127 | android:layout_width="fill_parent" | 137 | android:layout_width="fill_parent" |
| 128 | android:layout_height="60dp" | 138 | android:layout_height="60dp" |
| 129 | - android:paddingRight="100dp" | 139 | + android:layout_below="@id/election_pannal_OX" |
| 130 | android:background="@color/white" | 140 | android:background="@color/white" |
| 131 | - android:orientation="horizontal"> | 141 | + android:orientation="horizontal" |
| 142 | + android:paddingRight="100dp"> | ||
| 132 | 143 | ||
| 133 | <TextView | 144 | <TextView |
| 134 | android:id="@+id/seq" | 145 | android:id="@+id/seq" |
| 135 | android:layout_width="120dp" | 146 | android:layout_width="120dp" |
| 136 | android:layout_height="wrap_content" | 147 | android:layout_height="wrap_content" |
| 148 | + android:layout_gravity="center_vertical" | ||
| 137 | android:layout_marginLeft="150dp" | 149 | android:layout_marginLeft="150dp" |
| 138 | android:gravity="center" | 150 | android:gravity="center" |
| 139 | - android:layout_gravity="center_vertical" | ||
| 140 | android:text="序号" | 151 | android:text="序号" |
| 141 | android:textColor="@color/gray" | 152 | android:textColor="@color/gray" |
| 142 | android:textSize="@dimen/big_text_p6" /> | 153 | android:textSize="@dimen/big_text_p6" /> |
| @@ -146,8 +157,8 @@ | @@ -146,8 +157,8 @@ | ||
| 146 | android:layout_width="0dp" | 157 | android:layout_width="0dp" |
| 147 | android:layout_height="wrap_content" | 158 | android:layout_height="wrap_content" |
| 148 | android:layout_gravity="center_vertical" | 159 | android:layout_gravity="center_vertical" |
| 149 | - android:layout_weight="1" | ||
| 150 | android:layout_marginLeft="40dp" | 160 | android:layout_marginLeft="40dp" |
| 161 | + android:layout_weight="1" | ||
| 151 | android:gravity="left|center_vertical" | 162 | android:gravity="left|center_vertical" |
| 152 | android:text="侯选人" | 163 | android:text="侯选人" |
| 153 | android:textColor="@color/red" | 164 | android:textColor="@color/red" |
| @@ -156,39 +167,40 @@ | @@ -156,39 +167,40 @@ | ||
| 156 | <TextView | 167 | <TextView |
| 157 | android:layout_width="wrap_content" | 168 | android:layout_width="wrap_content" |
| 158 | android:layout_height="wrap_content" | 169 | android:layout_height="wrap_content" |
| 159 | - android:textColor="@color/red" | ||
| 160 | - android:textSize="@dimen/big_text_p6" | ||
| 161 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 162 | android:layout_gravity="center_vertical" | 170 | android:layout_gravity="center_vertical" |
| 163 | - android:text="@string/agree"/> | 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" /> | ||
| 164 | 175 | ||
| 165 | <TextView | 176 | <TextView |
| 166 | android:layout_width="wrap_content" | 177 | android:layout_width="wrap_content" |
| 167 | android:layout_height="wrap_content" | 178 | android:layout_height="wrap_content" |
| 168 | - android:textColor="@color/red" | ||
| 169 | - android:textSize="@dimen/big_text_p6" | ||
| 170 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 171 | android:layout_gravity="center_vertical" | 179 | android:layout_gravity="center_vertical" |
| 172 | - android:text="@string/oppose"/> | 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" /> | ||
| 173 | 184 | ||
| 174 | <TextView | 185 | <TextView |
| 175 | android:layout_width="wrap_content" | 186 | android:layout_width="wrap_content" |
| 176 | android:layout_height="wrap_content" | 187 | android:layout_height="wrap_content" |
| 177 | - android:textColor="@color/red" | ||
| 178 | - android:textSize="@dimen/big_text_p6" | ||
| 179 | - android:layout_marginLeft="@dimen/button_to_content" | ||
| 180 | android:layout_gravity="center_vertical" | 188 | android:layout_gravity="center_vertical" |
| 189 | + android:layout_marginLeft="@dimen/button_to_content" | ||
| 181 | android:text="@string/delete" | 190 | android:text="@string/delete" |
| 182 | - android:visibility="gone"/> | 191 | + android:textColor="@color/red" |
| 192 | + android:textSize="@dimen/big_text_p6" | ||
| 193 | + android:visibility="gone" /> | ||
| 183 | 194 | ||
| 184 | </LinearLayout> | 195 | </LinearLayout> |
| 185 | 196 | ||
| 186 | <View | 197 | <View |
| 187 | android:id="@+id/line" | 198 | android:id="@+id/line" |
| 188 | - android:layout_below="@id/title_layout" | ||
| 189 | android:layout_width="match_parent" | 199 | android:layout_width="match_parent" |
| 190 | android:layout_height="2dp" | 200 | android:layout_height="2dp" |
| 191 | - android:background="@color/votebakground"/> | 201 | + android:layout_below="@id/title_layout" |
| 202 | + android:background="@color/votebakground" /> | ||
| 203 | + | ||
| 192 | <ListView | 204 | <ListView |
| 193 | android:id="@+id/election_listview" | 205 | android:id="@+id/election_listview" |
| 194 | android:layout_width="fill_parent" | 206 | android:layout_width="fill_parent" |
| @@ -214,8 +226,8 @@ | @@ -214,8 +226,8 @@ | ||
| 214 | android:id="@+id/election_pageup" | 226 | android:id="@+id/election_pageup" |
| 215 | android:layout_width="wrap_content" | 227 | android:layout_width="wrap_content" |
| 216 | android:layout_height="0dp" | 228 | android:layout_height="0dp" |
| 217 | - android:padding="10dp" | ||
| 218 | android:layout_weight="1" | 229 | android:layout_weight="1" |
| 230 | + android:padding="10dp" | ||
| 219 | android:src="@drawable/page_up" /> | 231 | android:src="@drawable/page_up" /> |
| 220 | 232 | ||
| 221 | <ImageView | 233 | <ImageView |
| @@ -236,107 +248,56 @@ | @@ -236,107 +248,56 @@ | ||
| 236 | 248 | ||
| 237 | </LinearLayout> | 249 | </LinearLayout> |
| 238 | 250 | ||
| 239 | - <LinearLayout | 251 | + <RelativeLayout |
| 240 | android:id="@+id/election_add_other_panel" | 252 | android:id="@+id/election_add_other_panel" |
| 241 | android:layout_width="match_parent" | 253 | android:layout_width="match_parent" |
| 242 | android:layout_height="match_parent" | 254 | android:layout_height="match_parent" |
| 243 | - android:background="@color/black" | ||
| 244 | - android:orientation="vertical" | ||
| 245 | - android:visibility="gone"> | 255 | + android:layout_below="@id/line_panel" |
| 256 | + android:visibility="gone" | ||
| 257 | + android:background="#E5E5E5"> | ||
| 246 | 258 | ||
| 247 | - <!--输入框--> | ||
| 248 | <LinearLayout | 259 | <LinearLayout |
| 249 | - android:layout_width="match_parent" | ||
| 250 | - android:layout_height="match_parent" | ||
| 251 | - android:layout_weight="0.2" | 260 | + android:id="@+id/name_layout" |
| 261 | + android:layout_width="wrap_content" | ||
| 262 | + android:layout_height="wrap_content" | ||
| 263 | + android:layout_marginLeft="20dp" | ||
| 264 | + android:layout_marginTop="20dp" | ||
| 252 | android:orientation="horizontal"> | 265 | android:orientation="horizontal"> |
| 253 | 266 | ||
| 254 | - <LinearLayout | ||
| 255 | - android:layout_width="match_parent" | ||
| 256 | - android:layout_height="match_parent" | ||
| 257 | - android:layout_margin="50dp" | ||
| 258 | - android:layout_weight="1" | ||
| 259 | - android:background="@drawable/shape" | ||
| 260 | - android:gravity="center" | ||
| 261 | - android:orientation="vertical"> | ||
| 262 | - | ||
| 263 | - <TextView | ||
| 264 | - android:layout_width="wrap_content" | ||
| 265 | - android:layout_height="wrap_content" | ||
| 266 | - android:layout_centerHorizontal="true" | ||
| 267 | - android:layout_marginBottom="20dp" | ||
| 268 | - android:text="@string/input_other" | ||
| 269 | - android:textColor="@color/white" | ||
| 270 | - android:textSize="@dimen/big_text_p5" /> | ||
| 271 | - | ||
| 272 | - <com.sunvote.xpadapp.base.ZanyEditText | ||
| 273 | - android:id="@+id/election_add_edit" | ||
| 274 | - android:layout_width="200dp" | ||
| 275 | - android:layout_height="60dp" | ||
| 276 | - android:layout_marginTop="40dp" | ||
| 277 | - android:background="#e8e8e8" | ||
| 278 | - android:gravity="center" | ||
| 279 | - android:imeOptions="flagNoExtractUi" | ||
| 280 | - android:lines="1" | ||
| 281 | - android:textSize="@dimen/big_text_p4" /> | ||
| 282 | - </LinearLayout> | ||
| 283 | - | ||
| 284 | - <LinearLayout | ||
| 285 | - android:layout_width="match_parent" | ||
| 286 | - android:layout_height="match_parent" | ||
| 287 | - android:layout_margin="30dp" | ||
| 288 | - android:layout_weight="1" | ||
| 289 | - android:background="@drawable/shape" | ||
| 290 | - android:gravity="center" | ||
| 291 | - android:orientation="vertical"> | ||
| 292 | - | ||
| 293 | - <TextView | ||
| 294 | - android:layout_width="match_parent" | ||
| 295 | - android:layout_height="50px" | ||
| 296 | - android:layout_centerHorizontal="true" | ||
| 297 | - android:gravity="center" | ||
| 298 | - android:text="@string/input_other" | ||
| 299 | - android:textColor="@color/white" | ||
| 300 | - android:textSize="@dimen/big_text_p5" /> | ||
| 301 | - | ||
| 302 | - <FrameLayout | ||
| 303 | - android:layout_width="match_parent" | ||
| 304 | - android:layout_height="match_parent" | ||
| 305 | - android:layout_margin="5dp" | ||
| 306 | - android:background="@drawable/shape"> | ||
| 307 | - | ||
| 308 | - <com.sunvote.xpadapp.base.PaletteView | ||
| 309 | - android:id="@+id/draw_view" | ||
| 310 | - android:layout_width="match_parent" | ||
| 311 | - android:layout_height="match_parent" /> | ||
| 312 | - | ||
| 313 | - <ImageView | ||
| 314 | - android:id="@+id/clear_img" | ||
| 315 | - android:layout_width="wrap_content" | ||
| 316 | - android:layout_height="wrap_content" | ||
| 317 | - android:layout_gravity="bottom|right" | ||
| 318 | - android:layout_marginBottom="20dp" | ||
| 319 | - android:layout_marginRight="20dp" | ||
| 320 | - android:src="@drawable/ic_clear" /> | ||
| 321 | - </FrameLayout> | ||
| 322 | - | ||
| 323 | - </LinearLayout> | 267 | + <TextView |
| 268 | + android:layout_width="wrap_content" | ||
| 269 | + android:layout_height="60dp" | ||
| 270 | + android:text="@string/input_other" | ||
| 271 | + android:textColor="@color/gray" | ||
| 272 | + android:textSize="@dimen/big_text_p5" /> | ||
| 273 | + | ||
| 274 | + <com.sunvote.xpadapp.base.ZanyEditText | ||
| 275 | + android:id="@+id/election_add_edit" | ||
| 276 | + android:layout_width="200dp" | ||
| 277 | + android:layout_height="60dp" | ||
| 278 | + android:layout_marginLeft="20dp" | ||
| 279 | + android:background="@color/white" | ||
| 280 | + android:imeOptions="flagNoExtractUi" | ||
| 281 | + android:lines="1" | ||
| 282 | + android:textSize="@dimen/big_text_p4" /> | ||
| 324 | </LinearLayout> | 283 | </LinearLayout> |
| 325 | 284 | ||
| 326 | <!--按钮--> | 285 | <!--按钮--> |
| 327 | <LinearLayout | 286 | <LinearLayout |
| 328 | - android:layout_width="match_parent" | ||
| 329 | - android:layout_height="match_parent" | ||
| 330 | - android:layout_weight="0.8" | ||
| 331 | - android:gravity="center|right" | 287 | + android:id="@+id/bottom_linear" |
| 288 | + android:layout_width="wrap_content" | ||
| 289 | + android:layout_height="wrap_content" | ||
| 290 | + android:layout_alignParentBottom="true" | ||
| 291 | + android:layout_centerHorizontal="true" | ||
| 292 | + android:layout_marginBottom="20dp" | ||
| 332 | android:orientation="horizontal"> | 293 | android:orientation="horizontal"> |
| 333 | 294 | ||
| 334 | <Button | 295 | <Button |
| 335 | android:id="@+id/election_add_edit_btn_cancel" | 296 | android:id="@+id/election_add_edit_btn_cancel" |
| 336 | android:layout_width="@dimen/button_width" | 297 | android:layout_width="@dimen/button_width" |
| 337 | android:layout_height="@dimen/button_heigh" | 298 | android:layout_height="@dimen/button_heigh" |
| 338 | - android:layout_marginRight="@dimen/content_margin" | ||
| 339 | - android:background="@drawable/btn_signin_d" | 299 | + android:layout_marginRight="80dp" |
| 300 | + android:background="@drawable/oppos_selector" | ||
| 340 | android:text="@string/cancel" | 301 | android:text="@string/cancel" |
| 341 | android:textColor="@color/white" | 302 | android:textColor="@color/white" |
| 342 | android:textSize="@dimen/big_text_p4" | 303 | android:textSize="@dimen/big_text_p4" |
| @@ -346,7 +307,7 @@ | @@ -346,7 +307,7 @@ | ||
| 346 | android:id="@+id/election_add_edit_btn_ok" | 307 | android:id="@+id/election_add_edit_btn_ok" |
| 347 | android:layout_width="@dimen/button_width" | 308 | android:layout_width="@dimen/button_width" |
| 348 | android:layout_height="@dimen/button_heigh" | 309 | android:layout_height="@dimen/button_heigh" |
| 349 | - android:layout_marginRight="@dimen/content_margin" | 310 | + android:layout_marginLeft="80dp" |
| 350 | android:background="@drawable/btn_agree" | 311 | android:background="@drawable/btn_agree" |
| 351 | android:text="@string/ok" | 312 | android:text="@string/ok" |
| 352 | android:textColor="@color/white" | 313 | android:textColor="@color/white" |
| @@ -354,7 +315,44 @@ | @@ -354,7 +315,44 @@ | ||
| 354 | android:textStyle="bold" /> | 315 | android:textStyle="bold" /> |
| 355 | </LinearLayout> | 316 | </LinearLayout> |
| 356 | 317 | ||
| 357 | - </LinearLayout> | 318 | + <RelativeLayout |
| 319 | + android:layout_width="match_parent" | ||
| 320 | + android:layout_height="match_parent" | ||
| 321 | + android:layout_below="@id/name_layout" | ||
| 322 | + android:layout_above="@id/bottom_linear" | ||
| 323 | + android:layout_margin="20dp" | ||
| 324 | + android:background="@color/white" | ||
| 325 | + android:gravity="center" | ||
| 326 | + android:orientation="vertical"> | ||
| 327 | + | ||
| 328 | + <TextView | ||
| 329 | + android:layout_width="wrap_content" | ||
| 330 | + android:layout_height="wrap_content" | ||
| 331 | + android:layout_centerInParent="true" | ||
| 332 | + android:text="另选代表姓名(手写)" | ||
| 333 | + android:textSize="@dimen/big_text_p5" | ||
| 334 | + android:textColor="@color/darkgrey"/> | ||
| 335 | + | ||
| 336 | + <com.sunvote.xpadapp.base.PaletteView | ||
| 337 | + android:id="@+id/draw_view" | ||
| 338 | + android:layout_width="match_parent" | ||
| 339 | + android:layout_height="match_parent" /> | ||
| 340 | + | ||
| 341 | + <ImageView | ||
| 342 | + android:id="@+id/clear_img" | ||
| 343 | + android:layout_width="wrap_content" | ||
| 344 | + android:layout_height="wrap_content" | ||
| 345 | + android:layout_alignParentRight="true" | ||
| 346 | + android:layout_alignParentTop="true" | ||
| 347 | + android:layout_marginTop="20dp" | ||
| 348 | + android:layout_marginRight="20dp" | ||
| 349 | + android:src="@drawable/ic_clear" /> | ||
| 350 | + | ||
| 351 | + </RelativeLayout> | ||
| 352 | + | ||
| 353 | + | ||
| 354 | + | ||
| 355 | + </RelativeLayout> | ||
| 358 | 356 | ||
| 359 | <RelativeLayout | 357 | <RelativeLayout |
| 360 | android:id="@+id/singlevote_confirm_panel" | 358 | android:id="@+id/singlevote_confirm_panel" |
C5/app/src/main/res/layout/list_custom_election_item.xml
| @@ -7,7 +7,8 @@ | @@ -7,7 +7,8 @@ | ||
| 7 | <RelativeLayout | 7 | <RelativeLayout |
| 8 | android:layout_width="match_parent" | 8 | android:layout_width="match_parent" |
| 9 | android:layout_height="match_parent" | 9 | android:layout_height="match_parent" |
| 10 | - android:background="@color/white" | 10 | + android:paddingLeft="20dp" |
| 11 | + android:paddingRight="20dp" | ||
| 11 | android:layout_alignParentTop="true" | 12 | android:layout_alignParentTop="true" |
| 12 | android:layout_alignParentLeft="true" | 13 | android:layout_alignParentLeft="true" |
| 13 | android:layout_alignParentStart="true"> | 14 | android:layout_alignParentStart="true"> |
| @@ -23,29 +24,29 @@ | @@ -23,29 +24,29 @@ | ||
| 23 | android:textColor="@color/black" | 24 | android:textColor="@color/black" |
| 24 | android:textSize="26px" /> | 25 | android:textSize="26px" /> |
| 25 | 26 | ||
| 26 | - <View | 27 | + <!-- <View |
| 27 | android:id="@+id/election_item_middle" | 28 | android:id="@+id/election_item_middle" |
| 28 | android:layout_width="2px" | 29 | android:layout_width="2px" |
| 29 | android:layout_height="match_parent" | 30 | android:layout_height="match_parent" |
| 30 | android:background="@color/votebakground" | 31 | android:background="@color/votebakground" |
| 31 | android:layout_toRightOf="@id/list_election_item_num"/> | 32 | android:layout_toRightOf="@id/list_election_item_num"/> |
| 32 | - | 33 | +--> |
| 33 | <TextView | 34 | <TextView |
| 34 | android:id="@+id/list_election_item_name" | 35 | android:id="@+id/list_election_item_name" |
| 35 | android:layout_width="400dp" | 36 | android:layout_width="400dp" |
| 36 | android:layout_height="wrap_content" | 37 | android:layout_height="wrap_content" |
| 37 | android:layout_centerVertical="true" | 38 | android:layout_centerVertical="true" |
| 38 | - android:layout_toRightOf="@id/election_item_middle" | 39 | + android:layout_toRightOf="@id/list_election_item_num" |
| 39 | android:gravity="center" | 40 | android:gravity="center" |
| 40 | android:text="" | 41 | android:text="" |
| 41 | android:textColor="@color/black" | 42 | android:textColor="@color/black" |
| 42 | android:textSize="@dimen/big_text_p5" /> | 43 | android:textSize="@dimen/big_text_p5" /> |
| 43 | 44 | ||
| 44 | - <View | 45 | + <!-- <View |
| 45 | android:layout_width="2px" | 46 | android:layout_width="2px" |
| 46 | android:layout_height="match_parent" | 47 | android:layout_height="match_parent" |
| 47 | android:background="@color/votebakground" | 48 | android:background="@color/votebakground" |
| 48 | - android:layout_toRightOf="@id/list_election_item_name"/> | 49 | + android:layout_toRightOf="@id/list_election_item_name"/>--> |
| 49 | 50 | ||
| 50 | <RadioGroup | 51 | <RadioGroup |
| 51 | android:id="@+id/list_election_item_radio_group" | 52 | android:id="@+id/list_election_item_radio_group" |