Commit c83dd29b2533077d6fc2b5b82ce0bd492508376f
1 parent
e4b5e826
选举界面UI修改
Showing
4 changed files
with
215 additions
and
128 deletions
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
@@ -52,7 +52,6 @@ public class ElectionFragment extends BaseFragment { | @@ -52,7 +52,6 @@ public class ElectionFragment extends BaseFragment { | ||
52 | private TextView tvTitle; | 52 | private TextView tvTitle; |
53 | private ListView listview; | 53 | private ListView listview; |
54 | private TextView tvInfo; | 54 | private TextView tvInfo; |
55 | - private TextView tvPage; | ||
56 | private Button btnConfirm; | 55 | private Button btnConfirm; |
57 | private Button btnModify; | 56 | private Button btnModify; |
58 | private TextView tvResult; | 57 | private TextView tvResult; |
@@ -140,7 +139,7 @@ public class ElectionFragment extends BaseFragment { | @@ -140,7 +139,7 @@ public class ElectionFragment extends BaseFragment { | ||
140 | tv_all_xx=(TextView) view.findViewById(R.id.tv_all_xx); | 139 | tv_all_xx=(TextView) view.findViewById(R.id.tv_all_xx); |
141 | btn_all_ok =(ImageButton) view.findViewById(R.id.btn_all_ok); | 140 | btn_all_ok =(ImageButton) view.findViewById(R.id.btn_all_ok); |
142 | btn_all_xx=(ImageButton) view.findViewById(R.id.btn_all_xx); | 141 | btn_all_xx=(ImageButton) view.findViewById(R.id.btn_all_xx); |
143 | - Button btnPageLast = (Button) view.findViewById(R.id.election_pagelast); | 142 | + View btnPageLast = view.findViewById(R.id.election_pagelast); |
144 | addOtherLayout.setOnClickListener(new OnClickListener() { | 143 | addOtherLayout.setOnClickListener(new OnClickListener() { |
145 | @Override | 144 | @Override |
146 | public void onClick(View v) { | 145 | public void onClick(View v) { |
@@ -158,9 +157,8 @@ public class ElectionFragment extends BaseFragment { | @@ -158,9 +157,8 @@ public class ElectionFragment extends BaseFragment { | ||
158 | } | 157 | } |
159 | }); | 158 | }); |
160 | 159 | ||
161 | - tvPage = (TextView) view.findViewById(R.id.election_page); | ||
162 | - Button btnPageUp = (Button) view.findViewById(R.id.election_pageup); | ||
163 | - Button btnPageDown = (Button) view.findViewById(R.id.election_pagedown); | 160 | + View btnPageUp = view.findViewById(R.id.election_pageup); |
161 | + View btnPageDown = view.findViewById(R.id.election_pagedown); | ||
164 | 162 | ||
165 | btnPageUp.setOnClickListener(new OnClickListener() { | 163 | btnPageUp.setOnClickListener(new OnClickListener() { |
166 | 164 | ||
@@ -169,7 +167,6 @@ public class ElectionFragment extends BaseFragment { | @@ -169,7 +167,6 @@ public class ElectionFragment extends BaseFragment { | ||
169 | if (page >= 1) { | 167 | if (page >= 1) { |
170 | page--; | 168 | page--; |
171 | listview.setSelection(page * pageSize); | 169 | listview.setSelection(page * pageSize); |
172 | - Log.d(TAG, "page:"+page); | ||
173 | } | 170 | } |
174 | } | 171 | } |
175 | }); | 172 | }); |
@@ -180,7 +177,6 @@ public class ElectionFragment extends BaseFragment { | @@ -180,7 +177,6 @@ public class ElectionFragment extends BaseFragment { | ||
180 | public void onClick(View v) { | 177 | public void onClick(View v) { |
181 | if (page < totalPage) { | 178 | if (page < totalPage) { |
182 | page++; | 179 | page++; |
183 | - Log.d(TAG, "page:"+page); | ||
184 | listview.setSelection((page) * pageSize); | 180 | listview.setSelection((page) * pageSize); |
185 | if(page == totalPage){ | 181 | if(page == totalPage){ |
186 | page--; | 182 | page--; |
@@ -196,7 +192,6 @@ public class ElectionFragment extends BaseFragment { | @@ -196,7 +192,6 @@ public class ElectionFragment extends BaseFragment { | ||
196 | public void onClick(View v) { | 192 | public void onClick(View v) { |
197 | page=totalPage; | 193 | page=totalPage; |
198 | listview.setSelection(aryContent.size()); | 194 | listview.setSelection(aryContent.size()); |
199 | - tvPage.setText(page + "/" + totalPage); | ||
200 | } | 195 | } |
201 | }); | 196 | }); |
202 | 197 | ||
@@ -366,7 +361,6 @@ public class ElectionFragment extends BaseFragment { | @@ -366,7 +361,6 @@ public class ElectionFragment extends BaseFragment { | ||
366 | // | 361 | // |
367 | // } | 362 | // } |
368 | // }); | 363 | // }); |
369 | - tvPage.setText(page + "/" + totalPage); | ||
370 | //tvInfo.setText(""); | 364 | //tvInfo.setText(""); |
371 | if(voteInfo!=null){ | 365 | if(voteInfo!=null){ |
372 | if(voteInfo!=null){ | 366 | if(voteInfo!=null){ |
@@ -596,7 +590,7 @@ public class ElectionFragment extends BaseFragment { | @@ -596,7 +590,7 @@ public class ElectionFragment extends BaseFragment { | ||
596 | */ | 590 | */ |
597 | private class MyAdapter extends BaseAdapter { | 591 | private class MyAdapter extends BaseAdapter { |
598 | 592 | ||
599 | - private LayoutInflater mInflater; // �õ�һ��LayoutInfalter�����������벼�� | 593 | + private LayoutInflater mInflater; |
600 | 594 | ||
601 | public MyAdapter(Context context) { | 595 | public MyAdapter(Context context) { |
602 | this.mInflater = LayoutInflater.from(context); | 596 | this.mInflater = LayoutInflater.from(context); |
@@ -674,6 +668,7 @@ public class ElectionFragment extends BaseFragment { | @@ -674,6 +668,7 @@ public class ElectionFragment extends BaseFragment { | ||
674 | convertView = mInflater.inflate(R.layout.list_election_item, null); | 668 | convertView = mInflater.inflate(R.layout.list_election_item, null); |
675 | holder = new ViewHolder(); | 669 | holder = new ViewHolder(); |
676 | holder.tvName = (TextView) convertView.findViewById(R.id.list_election_item_name); | 670 | holder.tvName = (TextView) convertView.findViewById(R.id.list_election_item_name); |
671 | + holder.seq = (TextView) convertView.findViewById(R.id.seq); | ||
677 | holder.btnO = (RadioButton) convertView.findViewById(R.id.list_election_item_oo); | 672 | holder.btnO = (RadioButton) convertView.findViewById(R.id.list_election_item_oo); |
678 | holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to | 673 | holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to |
679 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); | 674 | holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); |
@@ -683,7 +678,7 @@ public class ElectionFragment extends BaseFragment { | @@ -683,7 +678,7 @@ public class ElectionFragment extends BaseFragment { | ||
683 | } else { | 678 | } else { |
684 | holder = (ViewHolder) convertView.getTag(); // �� | 679 | holder = (ViewHolder) convertView.getTag(); // �� |
685 | } | 680 | } |
686 | - | 681 | + holder.seq.setText("" + (position+1)); |
687 | holder.tvName.setText(String.valueOf(it.title)); | 682 | holder.tvName.setText(String.valueOf(it.title)); |
688 | if (it.result == 3) { | 683 | if (it.result == 3) { |
689 | holder.RG.clearCheck(); | 684 | holder.RG.clearCheck(); |
@@ -805,6 +800,7 @@ public class ElectionFragment extends BaseFragment { | @@ -805,6 +800,7 @@ public class ElectionFragment extends BaseFragment { | ||
805 | 800 | ||
806 | /* ��ſؼ� ��ViewHolder */ | 801 | /* ��ſؼ� ��ViewHolder */ |
807 | public final class ViewHolder { | 802 | public final class ViewHolder { |
803 | + TextView seq; | ||
808 | public TextView tvName; | 804 | public TextView tvName; |
809 | public RadioButton btnO; | 805 | public RadioButton btnO; |
810 | public RadioButton btnX; | 806 | public RadioButton btnX; |
@@ -838,7 +834,7 @@ public class ElectionFragment extends BaseFragment { | @@ -838,7 +834,7 @@ public class ElectionFragment extends BaseFragment { | ||
838 | } | 834 | } |
839 | } | 835 | } |
840 | if(voteInfo!=null){ | 836 | if(voteInfo!=null){ |
841 | - tvInfo.setText(getString(R.string.should_select) + voteInfo.select + getString(R.string.should_select1) + votedCount + getString(R.string.person)); | 837 | + tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person)); |
842 | } | 838 | } |
843 | mAdapter.notifyDataSetChanged(); | 839 | mAdapter.notifyDataSetChanged(); |
844 | listview.invalidate(); | 840 | listview.invalidate(); |
C5/app/src/main/res/layout/fragment_election.xml
@@ -3,69 +3,91 @@ | @@ -3,69 +3,91 @@ | ||
3 | android:id="@+id/election_layout" | 3 | android:id="@+id/election_layout" |
4 | android:layout_width="match_parent" | 4 | android:layout_width="match_parent" |
5 | android:layout_height="match_parent" | 5 | android:layout_height="match_parent" |
6 | - android:background="@color/votebakground" > | 6 | + android:background="@color/votebakground"> |
7 | 7 | ||
8 | - <TextView | ||
9 | - android:id="@+id/election_title" | 8 | + <LinearLayout |
9 | + android:id="@+id/line_panel" | ||
10 | android:layout_width="match_parent" | 10 | android:layout_width="match_parent" |
11 | android:layout_height="wrap_content" | 11 | android:layout_height="wrap_content" |
12 | - android:layout_centerHorizontal="true" | ||
13 | - android:layout_marginTop="@dimen/content_margin" | ||
14 | - android:layout_marginLeft="@dimen/content_margin" | ||
15 | - android:layout_marginRight="@dimen/content_margin" | ||
16 | - android:ellipsize="end" | ||
17 | - android:gravity="center" | ||
18 | - android:lines="1" | ||
19 | - android:text="@string/sunvote_no_paper" | ||
20 | - android:textSize="@dimen/big_text_p4" /> | 12 | + android:background="@color/red" |
13 | + android:orientation="horizontal" | ||
14 | + android:paddingBottom="20dp" | ||
15 | + android:paddingLeft="20dp" | ||
16 | + android:paddingRight="80dp" | ||
17 | + android:paddingTop="20dp"> | ||
18 | + | ||
19 | + <TextView | ||
20 | + android:id="@+id/election_title" | ||
21 | + android:layout_width="match_parent" | ||
22 | + android:layout_height="wrap_content" | ||
23 | + android:layout_weight="1" | ||
24 | + android:ellipsize="end" | ||
25 | + android:lines="1" | ||
26 | + android:text="@string/sunvote_no_paper" | ||
27 | + android:textColor="@color/white" | ||
28 | + android:textSize="@dimen/big_text_p4" /> | ||
29 | + | ||
30 | + <TextView | ||
31 | + android:id="@+id/election_info" | ||
32 | + android:layout_width="wrap_content" | ||
33 | + android:layout_height="wrap_content" | ||
34 | + android:text="" | ||
35 | + android:layout_marginRight="20dp" | ||
36 | + android:textSize="@dimen/big_text_p5" /> | ||
37 | + | ||
38 | + </LinearLayout> | ||
39 | + | ||
40 | + | ||
21 | <RelativeLayout | 41 | <RelativeLayout |
22 | android:id="@+id/election_pannal_OX" | 42 | android:id="@+id/election_pannal_OX" |
23 | android:layout_width="match_parent" | 43 | android:layout_width="match_parent" |
24 | android:layout_height="@dimen/button_heigh" | 44 | android:layout_height="@dimen/button_heigh" |
25 | - android:layout_below="@+id/election_title" | ||
26 | - android:visibility="gone" > | 45 | + android:layout_below="@+id/line_panel" |
46 | + android:visibility="gone"> | ||
47 | + | ||
27 | <TextView | 48 | <TextView |
28 | android:id="@+id/xx" | 49 | android:id="@+id/xx" |
29 | android:layout_width="wrap_content" | 50 | android:layout_width="wrap_content" |
30 | android:layout_height="wrap_content" | 51 | android:layout_height="wrap_content" |
31 | - android:layout_centerInParent="true"/> | 52 | + android:layout_centerInParent="true" /> |
32 | 53 | ||
33 | <TextView | 54 | <TextView |
34 | android:id="@+id/tv_all_ok" | 55 | android:id="@+id/tv_all_ok" |
35 | - android:layout_toRightOf="@+id/xx" | ||
36 | android:layout_width="wrap_content" | 56 | android:layout_width="wrap_content" |
37 | android:layout_height="wrap_content" | 57 | android:layout_height="wrap_content" |
38 | android:layout_centerInParent="true" | 58 | android:layout_centerInParent="true" |
39 | - android:text="全赞成" | ||
40 | android:layout_marginLeft="10dp" | 59 | android:layout_marginLeft="10dp" |
41 | - android:textSize="@dimen/big_text_p4"/> | 60 | + android:layout_toRightOf="@+id/xx" |
61 | + android:text="全赞成" | ||
62 | + android:textSize="@dimen/big_text_p4" /> | ||
42 | 63 | ||
43 | <ImageButton | 64 | <ImageButton |
44 | android:id="@+id/btn_all_ok" | 65 | android:id="@+id/btn_all_ok" |
45 | - android:layout_toRightOf="@+id/tv_all_ok" | ||
46 | - android:background="@drawable/btn_oo" | ||
47 | - android:layout_centerInParent="true" | ||
48 | android:layout_width="wrap_content" | 66 | android:layout_width="wrap_content" |
49 | - android:layout_height="wrap_content" /> | 67 | + android:layout_height="wrap_content" |
68 | + android:layout_centerInParent="true" | ||
69 | + android:layout_toRightOf="@+id/tv_all_ok" | ||
70 | + android:background="@drawable/btn_oo" /> | ||
50 | 71 | ||
51 | <TextView | 72 | <TextView |
52 | android:id="@+id/tv_all_xx" | 73 | android:id="@+id/tv_all_xx" |
53 | android:layout_width="wrap_content" | 74 | android:layout_width="wrap_content" |
54 | android:layout_height="wrap_content" | 75 | android:layout_height="wrap_content" |
55 | - android:layout_marginLeft="@dimen/content_margin" | ||
56 | android:layout_centerInParent="true" | 76 | android:layout_centerInParent="true" |
77 | + android:layout_marginLeft="@dimen/content_margin" | ||
57 | android:layout_toRightOf="@+id/btn_all_ok" | 78 | android:layout_toRightOf="@+id/btn_all_ok" |
58 | android:text="全反对" | 79 | android:text="全反对" |
59 | - android:textSize="@dimen/big_text_p4"/> | 80 | + android:textSize="@dimen/big_text_p4" /> |
60 | 81 | ||
61 | <ImageButton | 82 | <ImageButton |
62 | android:id="@+id/btn_all_xx" | 83 | android:id="@+id/btn_all_xx" |
63 | - android:layout_toRightOf="@+id/tv_all_xx" | ||
64 | - android:background="@drawable/btn_xx" | ||
65 | - android:layout_centerInParent="true" | ||
66 | android:layout_width="wrap_content" | 84 | android:layout_width="wrap_content" |
67 | - android:layout_height="wrap_content" /> | 85 | + android:layout_height="wrap_content" |
86 | + android:layout_centerInParent="true" | ||
87 | + android:layout_toRightOf="@+id/tv_all_xx" | ||
88 | + android:background="@drawable/btn_xx" /> | ||
68 | </RelativeLayout> | 89 | </RelativeLayout> |
90 | + | ||
69 | <RelativeLayout | 91 | <RelativeLayout |
70 | android:id="@+id/election_pannal_bottom" | 92 | android:id="@+id/election_pannal_bottom" |
71 | android:layout_width="match_parent" | 93 | android:layout_width="match_parent" |
@@ -73,66 +95,14 @@ | @@ -73,66 +95,14 @@ | ||
73 | android:layout_alignParentBottom="true" | 95 | android:layout_alignParentBottom="true" |
74 | android:alpha="0.9" | 96 | android:alpha="0.9" |
75 | android:background="@drawable/gray_alpha" | 97 | android:background="@drawable/gray_alpha" |
76 | - android:visibility="visible" > | ||
77 | - | ||
78 | - <TextView | ||
79 | - android:id="@+id/election_info" | ||
80 | - android:layout_width="wrap_content" | ||
81 | - android:layout_height="wrap_content" | ||
82 | - android:layout_centerVertical="true" | ||
83 | - android:layout_marginLeft="@dimen/content_margin" | ||
84 | - android:text="" | ||
85 | - android:textSize="@dimen/big_text_p5" /> | ||
86 | - | ||
87 | - <TextView | ||
88 | - android:id="@+id/election_page" | ||
89 | - android:layout_width="wrap_content" | ||
90 | - android:layout_height="wrap_content" | ||
91 | - android:layout_centerInParent="true" | ||
92 | - android:text="1/1" | ||
93 | - android:textSize="@dimen/big_text_p5" | ||
94 | - android:visibility="invisible"/> | ||
95 | - | ||
96 | - <Button | ||
97 | - android:id="@+id/election_pageup" | ||
98 | - android:layout_width="wrap_content" | ||
99 | - android:layout_height="wrap_content" | ||
100 | - android:layout_centerVertical="true" | ||
101 | - android:layout_toLeftOf="@id/election_page" | ||
102 | - android:background="@drawable/page_selector" | ||
103 | - android:textSize="@dimen/big_text_p5" | ||
104 | - android:text="@string/page_up" | ||
105 | - android:visibility="visible" /> | ||
106 | - | ||
107 | - <Button | ||
108 | - android:id="@+id/election_pagedown" | ||
109 | - android:layout_width="wrap_content" | ||
110 | - android:layout_height="wrap_content" | ||
111 | - android:layout_centerVertical="true" | ||
112 | - android:layout_toRightOf="@id/election_page" | ||
113 | - android:background="@drawable/page_selector" | ||
114 | - android:textSize="@dimen/big_text_p5" | ||
115 | - android:text="@string/page_down" /> | ||
116 | - | ||
117 | - <Button | ||
118 | - android:id="@+id/election_pagelast" | ||
119 | - android:layout_width="wrap_content" | ||
120 | - android:layout_height="wrap_content" | ||
121 | - android:layout_centerVertical="true" | ||
122 | - android:layout_marginLeft="@dimen/content_margin" | ||
123 | - android:layout_toRightOf="@id/election_pagedown" | ||
124 | - android:background="@drawable/page_selector" | ||
125 | - android:textSize="@dimen/big_text_p5" | ||
126 | - android:text="最后一页" /> | ||
127 | - | 98 | + android:visibility="visible"> |
128 | <Button | 99 | <Button |
129 | android:id="@+id/election_btn_confirm" | 100 | android:id="@+id/election_btn_confirm" |
130 | android:layout_width="@dimen/button_width" | 101 | android:layout_width="@dimen/button_width" |
131 | android:layout_height="wrap_content" | 102 | android:layout_height="wrap_content" |
132 | - android:layout_alignParentRight="true" | ||
133 | - android:layout_centerVertical="true" | 103 | + android:layout_centerInParent="true" |
134 | android:layout_marginRight="@dimen/content_margin" | 104 | android:layout_marginRight="@dimen/content_margin" |
135 | - android:background="@drawable/signin_selector" | 105 | + android:background="@drawable/oppos_selector" |
136 | android:text="@string/confirm_submit" | 106 | android:text="@string/confirm_submit" |
137 | android:textColor="@color/white" | 107 | android:textColor="@color/white" |
138 | android:textSize="@dimen/big_text_p5" | 108 | android:textSize="@dimen/big_text_p5" |
@@ -142,27 +112,131 @@ | @@ -142,27 +112,131 @@ | ||
142 | android:id="@+id/election_btn_modify" | 112 | android:id="@+id/election_btn_modify" |
143 | android:layout_width="@dimen/button_width" | 113 | android:layout_width="@dimen/button_width" |
144 | android:layout_height="wrap_content" | 114 | android:layout_height="wrap_content" |
145 | - android:layout_alignParentRight="true" | ||
146 | - android:layout_centerVertical="true" | 115 | + android:layout_centerInParent="true" |
147 | android:layout_marginRight="@dimen/content_margin" | 116 | android:layout_marginRight="@dimen/content_margin" |
148 | android:background="@drawable/signin_selector" | 117 | android:background="@drawable/signin_selector" |
149 | android:text="@string/modify" | 118 | android:text="@string/modify" |
150 | android:textColor="@color/white" | 119 | android:textColor="@color/white" |
151 | android:textSize="@dimen/big_text_p5" | 120 | android:textSize="@dimen/big_text_p5" |
152 | - android:visibility="invisible" | ||
153 | - android:textStyle="bold" /> | 121 | + android:textStyle="bold" |
122 | + android:visibility="invisible" /> | ||
154 | </RelativeLayout> | 123 | </RelativeLayout> |
124 | + | ||
125 | + <LinearLayout | ||
126 | + android:id="@+id/title_layout" | ||
127 | + android:layout_below="@id/election_pannal_OX" | ||
128 | + android:layout_width="fill_parent" | ||
129 | + android:layout_height="60dp" | ||
130 | + android:paddingRight="100dp" | ||
131 | + android:background="@color/white" | ||
132 | + android:orientation="horizontal"> | ||
133 | + | ||
134 | + <TextView | ||
135 | + android:id="@+id/seq" | ||
136 | + android:layout_width="120dp" | ||
137 | + android:layout_height="wrap_content" | ||
138 | + android:layout_marginLeft="150dp" | ||
139 | + android:gravity="center" | ||
140 | + android:layout_gravity="center_vertical" | ||
141 | + android:text="序号" | ||
142 | + android:textColor="@color/gray" | ||
143 | + android:textSize="@dimen/big_text_p6" /> | ||
144 | + | ||
145 | + <TextView | ||
146 | + android:id="@+id/list_election_item_name" | ||
147 | + android:layout_width="0dp" | ||
148 | + android:layout_height="wrap_content" | ||
149 | + android:layout_gravity="center_vertical" | ||
150 | + android:layout_weight="1" | ||
151 | + android:layout_marginLeft="40dp" | ||
152 | + android:gravity="left|center_vertical" | ||
153 | + android:text="获选人" | ||
154 | + android:textColor="@color/red" | ||
155 | + android:textSize="@dimen/big_text_p6" /> | ||
156 | + | ||
157 | + <TextView | ||
158 | + android:layout_width="wrap_content" | ||
159 | + android:layout_height="wrap_content" | ||
160 | + android:textColor="@color/red" | ||
161 | + android:textSize="@dimen/big_text_p6" | ||
162 | + android:layout_marginLeft="@dimen/button_to_content" | ||
163 | + android:layout_gravity="center_vertical" | ||
164 | + android:text="@string/agree"/> | ||
165 | + | ||
166 | + <TextView | ||
167 | + android:layout_width="wrap_content" | ||
168 | + android:layout_height="wrap_content" | ||
169 | + android:textColor="@color/red" | ||
170 | + android:textSize="@dimen/big_text_p6" | ||
171 | + android:layout_marginLeft="@dimen/button_to_content" | ||
172 | + android:layout_gravity="center_vertical" | ||
173 | + android:text="@string/oppose"/> | ||
174 | + | ||
175 | + <TextView | ||
176 | + android:layout_width="wrap_content" | ||
177 | + android:layout_height="wrap_content" | ||
178 | + android:textColor="@color/red" | ||
179 | + android:textSize="@dimen/big_text_p6" | ||
180 | + android:layout_marginLeft="@dimen/button_to_content" | ||
181 | + android:layout_gravity="center_vertical" | ||
182 | + android:text="@string/delete" | ||
183 | + android:visibility="gone"/> | ||
184 | + | ||
185 | + </LinearLayout> | ||
186 | + | ||
187 | + <View | ||
188 | + android:id="@+id/line" | ||
189 | + android:layout_below="@id/title_layout" | ||
190 | + android:layout_width="match_parent" | ||
191 | + android:layout_height="2dp" | ||
192 | + android:background="@color/votebakground"/> | ||
155 | <ListView | 193 | <ListView |
156 | android:id="@+id/election_listview" | 194 | android:id="@+id/election_listview" |
157 | android:layout_width="fill_parent" | 195 | android:layout_width="fill_parent" |
158 | android:layout_height="fill_parent" | 196 | android:layout_height="fill_parent" |
159 | android:layout_above="@id/election_pannal_bottom" | 197 | android:layout_above="@id/election_pannal_bottom" |
160 | - android:layout_below="@id/election_pannal_OX" | ||
161 | - android:layout_marginTop="@dimen/content_margin" | 198 | + android:layout_below="@id/line" |
162 | android:layout_marginBottom="2dp" | 199 | android:layout_marginBottom="2dp" |
163 | android:divider="@color/votebakground" | 200 | android:divider="@color/votebakground" |
164 | - android:dividerHeight="2dp" > | ||
165 | - </ListView> | 201 | + android:dividerHeight="2dp"></ListView> |
202 | + | ||
203 | + <LinearLayout | ||
204 | + android:layout_width="40dp" | ||
205 | + android:layout_height="150dp" | ||
206 | + android:layout_alignParentRight="true" | ||
207 | + android:layout_centerVertical="true" | ||
208 | + android:layout_marginBottom="50dp" | ||
209 | + android:layout_marginRight="20dp" | ||
210 | + android:layout_marginTop="50dp" | ||
211 | + android:background="@drawable/right_control" | ||
212 | + android:orientation="vertical"> | ||
213 | + | ||
214 | + <ImageView | ||
215 | + android:id="@+id/election_pageup" | ||
216 | + android:layout_width="wrap_content" | ||
217 | + android:layout_height="0dp" | ||
218 | + android:padding="10dp" | ||
219 | + android:layout_weight="1" | ||
220 | + android:src="@drawable/page_up" /> | ||
221 | + | ||
222 | + <ImageView | ||
223 | + android:id="@+id/election_pagedown" | ||
224 | + android:layout_width="wrap_content" | ||
225 | + android:layout_height="0dp" | ||
226 | + android:layout_weight="1" | ||
227 | + android:padding="10dp" | ||
228 | + android:src="@drawable/page_down" /> | ||
229 | + | ||
230 | + <ImageView | ||
231 | + android:id="@+id/election_pagelast" | ||
232 | + android:layout_width="wrap_content" | ||
233 | + android:layout_height="0dp" | ||
234 | + android:layout_weight="1" | ||
235 | + android:padding="10dp" | ||
236 | + android:src="@drawable/page_frist" /> | ||
237 | + | ||
238 | + </LinearLayout> | ||
239 | + | ||
166 | <LinearLayout | 240 | <LinearLayout |
167 | android:id="@+id/election_add_other_panel" | 241 | android:id="@+id/election_add_other_panel" |
168 | android:layout_width="match_parent" | 242 | android:layout_width="match_parent" |
@@ -175,8 +249,8 @@ | @@ -175,8 +249,8 @@ | ||
175 | <LinearLayout | 249 | <LinearLayout |
176 | android:layout_width="match_parent" | 250 | android:layout_width="match_parent" |
177 | android:layout_height="match_parent" | 251 | android:layout_height="match_parent" |
178 | - android:orientation="horizontal" | ||
179 | - android:layout_weight="0.2"> | 252 | + android:layout_weight="0.2" |
253 | + android:orientation="horizontal"> | ||
180 | 254 | ||
181 | <LinearLayout | 255 | <LinearLayout |
182 | android:layout_width="match_parent" | 256 | android:layout_width="match_parent" |
@@ -184,15 +258,16 @@ | @@ -184,15 +258,16 @@ | ||
184 | android:layout_margin="50dp" | 258 | android:layout_margin="50dp" |
185 | android:layout_weight="1" | 259 | android:layout_weight="1" |
186 | android:background="@drawable/shape" | 260 | android:background="@drawable/shape" |
187 | - android:orientation="vertical" | ||
188 | - android:gravity="center"> | 261 | + android:gravity="center" |
262 | + android:orientation="vertical"> | ||
263 | + | ||
189 | <TextView | 264 | <TextView |
190 | android:layout_width="wrap_content" | 265 | android:layout_width="wrap_content" |
191 | android:layout_height="wrap_content" | 266 | android:layout_height="wrap_content" |
192 | android:layout_centerHorizontal="true" | 267 | android:layout_centerHorizontal="true" |
268 | + android:layout_marginBottom="20dp" | ||
193 | android:text="@string/input_other" | 269 | android:text="@string/input_other" |
194 | android:textColor="@color/white" | 270 | android:textColor="@color/white" |
195 | - android:layout_marginBottom="20dp" | ||
196 | android:textSize="@dimen/big_text_p5" /> | 271 | android:textSize="@dimen/big_text_p5" /> |
197 | 272 | ||
198 | <com.sunvote.xpadapp.base.ZanyEditText | 273 | <com.sunvote.xpadapp.base.ZanyEditText |
@@ -203,27 +278,27 @@ | @@ -203,27 +278,27 @@ | ||
203 | android:background="#e8e8e8" | 278 | android:background="#e8e8e8" |
204 | android:gravity="center" | 279 | android:gravity="center" |
205 | android:imeOptions="flagNoExtractUi" | 280 | android:imeOptions="flagNoExtractUi" |
206 | - android:textSize="@dimen/big_text_p4" | ||
207 | - android:lines="1" /> | 281 | + android:lines="1" |
282 | + android:textSize="@dimen/big_text_p4" /> | ||
208 | </LinearLayout> | 283 | </LinearLayout> |
209 | 284 | ||
210 | <LinearLayout | 285 | <LinearLayout |
211 | android:layout_width="match_parent" | 286 | android:layout_width="match_parent" |
212 | android:layout_height="match_parent" | 287 | android:layout_height="match_parent" |
213 | - android:orientation="vertical" | ||
214 | - android:layout_weight="1" | ||
215 | android:layout_margin="30dp" | 288 | android:layout_margin="30dp" |
289 | + android:layout_weight="1" | ||
216 | android:background="@drawable/shape" | 290 | android:background="@drawable/shape" |
217 | - android:gravity="center"> | 291 | + android:gravity="center" |
292 | + android:orientation="vertical"> | ||
218 | 293 | ||
219 | <TextView | 294 | <TextView |
220 | android:layout_width="match_parent" | 295 | android:layout_width="match_parent" |
221 | android:layout_height="50px" | 296 | android:layout_height="50px" |
222 | android:layout_centerHorizontal="true" | 297 | android:layout_centerHorizontal="true" |
298 | + android:gravity="center" | ||
223 | android:text="@string/input_other" | 299 | android:text="@string/input_other" |
224 | android:textColor="@color/white" | 300 | android:textColor="@color/white" |
225 | - android:textSize="@dimen/big_text_p5" | ||
226 | - android:gravity="center"/> | 301 | + android:textSize="@dimen/big_text_p5" /> |
227 | 302 | ||
228 | <FrameLayout | 303 | <FrameLayout |
229 | android:layout_width="match_parent" | 304 | android:layout_width="match_parent" |
@@ -234,16 +309,16 @@ | @@ -234,16 +309,16 @@ | ||
234 | <com.sunvote.xpadapp.base.PaletteView | 309 | <com.sunvote.xpadapp.base.PaletteView |
235 | android:id="@+id/draw_view" | 310 | android:id="@+id/draw_view" |
236 | android:layout_width="match_parent" | 311 | android:layout_width="match_parent" |
237 | - android:layout_height="match_parent"/> | 312 | + android:layout_height="match_parent" /> |
238 | 313 | ||
239 | <ImageView | 314 | <ImageView |
240 | android:id="@+id/clear_img" | 315 | android:id="@+id/clear_img" |
241 | android:layout_width="wrap_content" | 316 | android:layout_width="wrap_content" |
242 | android:layout_height="wrap_content" | 317 | android:layout_height="wrap_content" |
243 | - android:src="@drawable/ic_clear" | ||
244 | android:layout_gravity="bottom|right" | 318 | android:layout_gravity="bottom|right" |
245 | android:layout_marginBottom="20dp" | 319 | android:layout_marginBottom="20dp" |
246 | - android:layout_marginRight="20dp"/> | 320 | + android:layout_marginRight="20dp" |
321 | + android:src="@drawable/ic_clear" /> | ||
247 | </FrameLayout> | 322 | </FrameLayout> |
248 | 323 | ||
249 | </LinearLayout> | 324 | </LinearLayout> |
@@ -281,6 +356,7 @@ | @@ -281,6 +356,7 @@ | ||
281 | </LinearLayout> | 356 | </LinearLayout> |
282 | 357 | ||
283 | </LinearLayout> | 358 | </LinearLayout> |
359 | + | ||
284 | <RelativeLayout | 360 | <RelativeLayout |
285 | android:id="@+id/singlevote_confirm_panel" | 361 | android:id="@+id/singlevote_confirm_panel" |
286 | android:layout_width="fill_parent" | 362 | android:layout_width="fill_parent" |
@@ -293,12 +369,12 @@ | @@ -293,12 +369,12 @@ | ||
293 | android:layout_width="wrap_content" | 369 | android:layout_width="wrap_content" |
294 | android:layout_height="wrap_content" | 370 | android:layout_height="wrap_content" |
295 | android:layout_centerHorizontal="true" | 371 | android:layout_centerHorizontal="true" |
296 | - android:layout_marginTop="@dimen/button_to_content" | ||
297 | - android:text="@string/cant_modify_confirm" | ||
298 | - android:textColor="@color/white" | ||
299 | android:layout_marginLeft="@dimen/content_margin" | 372 | android:layout_marginLeft="@dimen/content_margin" |
300 | android:layout_marginRight="@dimen/content_margin" | 373 | android:layout_marginRight="@dimen/content_margin" |
374 | + android:layout_marginTop="@dimen/button_to_content" | ||
301 | android:gravity="center" | 375 | android:gravity="center" |
376 | + android:text="@string/cant_modify_confirm" | ||
377 | + android:textColor="@color/white" | ||
302 | android:textSize="@dimen/big_text_p4" /> | 378 | android:textSize="@dimen/big_text_p4" /> |
303 | 379 | ||
304 | <Button | 380 | <Button |
@@ -329,10 +405,14 @@ | @@ -329,10 +405,14 @@ | ||
329 | android:textSize="@dimen/big_text_p5" | 405 | android:textSize="@dimen/big_text_p5" |
330 | android:textStyle="bold" /> | 406 | android:textStyle="bold" /> |
331 | </RelativeLayout> | 407 | </RelativeLayout> |
408 | + | ||
332 | <TextView | 409 | <TextView |
333 | android:id="@+id/singlevote_tv_result" | 410 | android:id="@+id/singlevote_tv_result" |
334 | android:layout_width="wrap_content" | 411 | android:layout_width="wrap_content" |
335 | android:layout_height="wrap_content" | 412 | android:layout_height="wrap_content" |
413 | + android:layout_centerInParent="true" | ||
414 | + android:layout_marginRight="@dimen/content_margin" | ||
415 | + android:layout_marginTop="@dimen/content_margin" | ||
336 | android:alpha="0.9" | 416 | android:alpha="0.9" |
337 | android:background="@drawable/voted_empty" | 417 | android:background="@drawable/voted_empty" |
338 | android:gravity="center" | 418 | android:gravity="center" |
@@ -340,8 +420,5 @@ | @@ -340,8 +420,5 @@ | ||
340 | android:textColor="#ddff9933" | 420 | android:textColor="#ddff9933" |
341 | android:textSize="@dimen/big_text_p2" | 421 | android:textSize="@dimen/big_text_p2" |
342 | android:textStyle="bold" | 422 | android:textStyle="bold" |
343 | - android:visibility="invisible" | ||
344 | - android:layout_marginRight="@dimen/content_margin" | ||
345 | - android:layout_alignParentRight="true" | ||
346 | - android:layout_marginTop="@dimen/content_margin"/> | 423 | + android:visibility="invisible" /> |
347 | </RelativeLayout> | 424 | </RelativeLayout> |
348 | \ No newline at end of file | 425 | \ No newline at end of file |
C5/app/src/main/res/layout/list_election_item.xml
@@ -8,13 +8,26 @@ | @@ -8,13 +8,26 @@ | ||
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 | + | ||
12 | + <TextView | ||
13 | + android:id="@+id/seq" | ||
14 | + android:layout_width="120dp" | ||
15 | + android:layout_height="wrap_content" | ||
16 | + android:layout_marginLeft="150dp" | ||
17 | + android:gravity="center" | ||
18 | + android:layout_gravity="center_vertical" | ||
19 | + android:text="1" | ||
20 | + android:textColor="@color/gray" | ||
21 | + android:textSize="@dimen/big_text_p5" /> | ||
22 | + | ||
11 | <TextView | 23 | <TextView |
12 | android:id="@+id/list_election_item_name" | 24 | android:id="@+id/list_election_item_name" |
13 | android:layout_width="0dp" | 25 | android:layout_width="0dp" |
14 | android:layout_height="wrap_content" | 26 | android:layout_height="wrap_content" |
27 | + android:layout_gravity="center_vertical" | ||
15 | android:layout_weight="1" | 28 | android:layout_weight="1" |
16 | - android:layout_marginLeft="@dimen/content_margin" | ||
17 | - android:gravity="left" | 29 | + android:layout_marginLeft="40dp" |
30 | + android:gravity="left|center_vertical" | ||
18 | android:text="" | 31 | android:text="" |
19 | android:textColor="@color/black" | 32 | android:textColor="@color/black" |
20 | android:textSize="@dimen/big_text_p5" /> | 33 | android:textSize="@dimen/big_text_p5" /> |
@@ -23,6 +36,7 @@ | @@ -23,6 +36,7 @@ | ||
23 | android:id="@+id/list_election_item_radio_group" | 36 | android:id="@+id/list_election_item_radio_group" |
24 | android:layout_width="wrap_content" | 37 | android:layout_width="wrap_content" |
25 | android:layout_height="wrap_content" | 38 | android:layout_height="wrap_content" |
39 | + android:layout_gravity="center_vertical" | ||
26 | android:orientation="horizontal" > | 40 | android:orientation="horizontal" > |
27 | 41 | ||
28 | <RadioButton | 42 | <RadioButton |
C5/app/src/main/res/values/strings.xml
@@ -96,7 +96,7 @@ | @@ -96,7 +96,7 @@ | ||
96 | <string name="person">人</string> | 96 | <string name="person">人</string> |
97 | <string name="vote_not_start">投票未开始</string> | 97 | <string name="vote_not_start">投票未开始</string> |
98 | <string name="should_select">应选</string> | 98 | <string name="should_select">应选</string> |
99 | - <string name="should_select1">人 已选</string> | 99 | + <string name="should_select1">已选</string> |
100 | <string name="you_selected">"您选择了 “"</string> | 100 | <string name="you_selected">"您选择了 “"</string> |
101 | <string name="you_selected_confirm">” 投票后不可以修改,是否确定提交?</string> | 101 | <string name="you_selected_confirm">” 投票后不可以修改,是否确定提交?</string> |
102 | <string name="no_file_tips">会议%d的会议资料不存在</string> | 102 | <string name="no_file_tips">会议%d的会议资料不存在</string> |