diff --git a/C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java b/C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
index 1a0b660..be8770d 100644
--- a/C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
+++ b/C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
@@ -52,7 +52,6 @@ public class ElectionFragment extends BaseFragment {
private TextView tvTitle;
private ListView listview;
private TextView tvInfo;
- private TextView tvPage;
private Button btnConfirm;
private Button btnModify;
private TextView tvResult;
@@ -140,7 +139,7 @@ public class ElectionFragment extends BaseFragment {
tv_all_xx=(TextView) view.findViewById(R.id.tv_all_xx);
btn_all_ok =(ImageButton) view.findViewById(R.id.btn_all_ok);
btn_all_xx=(ImageButton) view.findViewById(R.id.btn_all_xx);
- Button btnPageLast = (Button) view.findViewById(R.id.election_pagelast);
+ View btnPageLast = view.findViewById(R.id.election_pagelast);
addOtherLayout.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
@@ -158,9 +157,8 @@ public class ElectionFragment extends BaseFragment {
}
});
- tvPage = (TextView) view.findViewById(R.id.election_page);
- Button btnPageUp = (Button) view.findViewById(R.id.election_pageup);
- Button btnPageDown = (Button) view.findViewById(R.id.election_pagedown);
+ View btnPageUp = view.findViewById(R.id.election_pageup);
+ View btnPageDown = view.findViewById(R.id.election_pagedown);
btnPageUp.setOnClickListener(new OnClickListener() {
@@ -169,7 +167,6 @@ public class ElectionFragment extends BaseFragment {
if (page >= 1) {
page--;
listview.setSelection(page * pageSize);
- Log.d(TAG, "page:"+page);
}
}
});
@@ -180,7 +177,6 @@ public class ElectionFragment extends BaseFragment {
public void onClick(View v) {
if (page < totalPage) {
page++;
- Log.d(TAG, "page:"+page);
listview.setSelection((page) * pageSize);
if(page == totalPage){
page--;
@@ -196,7 +192,6 @@ public class ElectionFragment extends BaseFragment {
public void onClick(View v) {
page=totalPage;
listview.setSelection(aryContent.size());
- tvPage.setText(page + "/" + totalPage);
}
});
@@ -366,7 +361,6 @@ public class ElectionFragment extends BaseFragment {
//
// }
// });
- tvPage.setText(page + "/" + totalPage);
//tvInfo.setText("");
if(voteInfo!=null){
if(voteInfo!=null){
@@ -596,7 +590,7 @@ public class ElectionFragment extends BaseFragment {
*/
private class MyAdapter extends BaseAdapter {
- private LayoutInflater mInflater; // �õ�һ��LayoutInfalter�����������벼��
+ private LayoutInflater mInflater;
public MyAdapter(Context context) {
this.mInflater = LayoutInflater.from(context);
@@ -674,6 +668,7 @@ public class ElectionFragment extends BaseFragment {
convertView = mInflater.inflate(R.layout.list_election_item, null);
holder = new ViewHolder();
holder.tvName = (TextView) convertView.findViewById(R.id.list_election_item_name);
+ holder.seq = (TextView) convertView.findViewById(R.id.seq);
holder.btnO = (RadioButton) convertView.findViewById(R.id.list_election_item_oo);
holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to
holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group);
@@ -683,7 +678,7 @@ public class ElectionFragment extends BaseFragment {
} else {
holder = (ViewHolder) convertView.getTag(); // ��
}
-
+ holder.seq.setText("" + (position+1));
holder.tvName.setText(String.valueOf(it.title));
if (it.result == 3) {
holder.RG.clearCheck();
@@ -805,6 +800,7 @@ public class ElectionFragment extends BaseFragment {
/* ��ſؼ� ��ViewHolder */
public final class ViewHolder {
+ TextView seq;
public TextView tvName;
public RadioButton btnO;
public RadioButton btnX;
@@ -838,7 +834,7 @@ public class ElectionFragment extends BaseFragment {
}
}
if(voteInfo!=null){
- tvInfo.setText(getString(R.string.should_select) + voteInfo.select + getString(R.string.should_select1) + votedCount + getString(R.string.person));
+ tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person));
}
mAdapter.notifyDataSetChanged();
listview.invalidate();
diff --git a/C5/app/src/main/res/layout/fragment_election.xml b/C5/app/src/main/res/layout/fragment_election.xml
index e5b7b1c..b1b1d0a 100644
--- a/C5/app/src/main/res/layout/fragment_election.xml
+++ b/C5/app/src/main/res/layout/fragment_election.xml
@@ -3,69 +3,91 @@
android:id="@+id/election_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/votebakground" >
+ android:background="@color/votebakground">
-
+ android:background="@color/red"
+ android:orientation="horizontal"
+ android:paddingBottom="20dp"
+ android:paddingLeft="20dp"
+ android:paddingRight="80dp"
+ android:paddingTop="20dp">
+
+
+
+
+
+
+
+
+ android:layout_below="@+id/line_panel"
+ android:visibility="gone">
+
+ android:layout_centerInParent="true" />
+ android:layout_toRightOf="@+id/xx"
+ android:text="全赞成"
+ android:textSize="@dimen/big_text_p4" />
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toRightOf="@+id/tv_all_ok"
+ android:background="@drawable/btn_oo" />
+ android:textSize="@dimen/big_text_p4" />
+ android:layout_height="wrap_content"
+ android:layout_centerInParent="true"
+ android:layout_toRightOf="@+id/tv_all_xx"
+ android:background="@drawable/btn_xx" />
+
-
-
-
-
-
-
-
-
-
-
-
+ android:visibility="visible">
+ android:textStyle="bold"
+ android:visibility="invisible" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ android:dividerHeight="2dp">
+
+
+
+
+
+
+
+
+
+
+
+ android:layout_weight="0.2"
+ android:orientation="horizontal">
+ android:gravity="center"
+ android:orientation="vertical">
+
+ android:lines="1"
+ android:textSize="@dimen/big_text_p4" />
+ android:gravity="center"
+ android:orientation="vertical">
+ android:textSize="@dimen/big_text_p5" />
+ android:layout_height="match_parent" />
+ android:layout_marginRight="20dp"
+ android:src="@drawable/ic_clear" />
@@ -281,6 +356,7 @@
+
+
+ android:visibility="invisible" />
\ No newline at end of file
diff --git a/C5/app/src/main/res/layout/list_election_item.xml b/C5/app/src/main/res/layout/list_election_item.xml
index 325447b..457b76b 100644
--- a/C5/app/src/main/res/layout/list_election_item.xml
+++ b/C5/app/src/main/res/layout/list_election_item.xml
@@ -8,13 +8,26 @@
android:layout_height="fill_parent"
android:background="@color/white"
android:orientation="horizontal">
+
+
+
@@ -23,6 +36,7 @@
android:id="@+id/list_election_item_radio_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
android:orientation="horizontal" >
人
投票未开始
应选
- 人 已选
+ 已选
"您选择了 “"
” 投票后不可以修改,是否确定提交?
会议%d的会议资料不存在