Commit 75386c2931d2f32b3ce31014577a2a101accbe25
1 parent
1c5059dd
选举结果UI修改
Showing
13 changed files
with
157 additions
and
128 deletions
C5/app/src/main/java/com/sunvote/xpadapp/MainActivity.java
... | ... | @@ -10,6 +10,7 @@ import android.content.BroadcastReceiver; |
10 | 10 | import android.content.DialogInterface; |
11 | 11 | import android.content.Intent; |
12 | 12 | import android.content.pm.PackageManager; |
13 | +import android.graphics.Color; | |
13 | 14 | import android.net.Uri; |
14 | 15 | import android.os.Build; |
15 | 16 | import android.os.Bundle; |
... | ... | @@ -546,6 +547,7 @@ public class MainActivity extends BaseActivity implements ComListener { |
546 | 547 | } |
547 | 548 | |
548 | 549 | private void hideResultFragment() { |
550 | + setBackgroundColor(Color.parseColor("#720600")); | |
549 | 551 | if (resultFragment == null) { |
550 | 552 | return; |
551 | 553 | } | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/MeetingWelcomeFragment.java
1 | 1 | package com.sunvote.xpadapp.fragments; |
2 | 2 | |
3 | 3 | import com.sunvote.util.LogUtil; |
4 | +import com.sunvote.xpadapp.MainActivity; | |
4 | 5 | import com.sunvote.xpadapp.R; |
5 | 6 | import com.sunvote.xpadapp.base.SuperBaseFragment; |
6 | 7 | |
7 | 8 | import android.app.FragmentManager; |
8 | 9 | import android.app.FragmentTransaction; |
10 | +import android.graphics.Color; | |
9 | 11 | import android.os.Bundle; |
10 | 12 | import android.view.LayoutInflater; |
11 | 13 | import android.view.View; |
... | ... | @@ -24,7 +26,7 @@ public class MeetingWelcomeFragment extends SuperBaseFragment { |
24 | 26 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
25 | 27 | LogUtil.d("MeetingWelcome", "onCreateView"); |
26 | 28 | View view = inflater.inflate(R.layout.fragment_welcome, container, false); |
27 | - | |
29 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#720600")); | |
28 | 30 | |
29 | 31 | |
30 | 32 | tv = (TextView) view.findViewById(R.id.welcome_title); |
... | ... | @@ -73,6 +75,7 @@ public class MeetingWelcomeFragment extends SuperBaseFragment { |
73 | 75 | @Override |
74 | 76 | public void onResume() { |
75 | 77 | super.onResume(); |
78 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#720600")); | |
76 | 79 | isAttach = true; |
77 | 80 | } |
78 | 81 | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/NoFileFragment.java
1 | 1 | package com.sunvote.xpadapp.fragments; |
2 | 2 | |
3 | 3 | import com.sunvote.util.LogUtil; |
4 | +import com.sunvote.xpadapp.MainActivity; | |
4 | 5 | import com.sunvote.xpadapp.R; |
5 | 6 | |
6 | 7 | import android.app.Activity; |
... | ... | @@ -29,7 +30,7 @@ public class NoFileFragment extends Fragment { |
29 | 30 | View view = inflater.inflate(R.layout.fragment_no_file, container, false); |
30 | 31 | |
31 | 32 | tv = (TextView) view.findViewById(R.id.fragment_no_file_title); |
32 | - | |
33 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#450603")); | |
33 | 34 | // String sname = mMainActivity.meetingInfo.meetingTitle; |
34 | 35 | tv.setText(String.format( getString(R.string.no_file_tips),meetingId)); |
35 | 36 | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/OnLineFragment.java
... | ... | @@ -8,6 +8,7 @@ import com.sunvote.xpadapp.base.BaseFragment; |
8 | 8 | import android.app.Fragment; |
9 | 9 | import android.app.FragmentManager; |
10 | 10 | import android.app.FragmentTransaction; |
11 | +import android.graphics.Color; | |
11 | 12 | import android.os.Bundle; |
12 | 13 | import android.os.Handler; |
13 | 14 | import android.os.Message; |
... | ... | @@ -31,6 +32,7 @@ public class OnLineFragment extends Fragment { |
31 | 32 | View adminView = (View)view.findViewById(R.id.fragment_online_btn_admin); |
32 | 33 | |
33 | 34 | tvtitle.setText(getString(R.string.sunvote_system)); |
35 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#720600")); | |
34 | 36 | |
35 | 37 | adminView.setOnClickListener(new OnClickListener() { |
36 | 38 | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ResultElectionFragment.java
... | ... | @@ -4,6 +4,7 @@ import android.annotation.SuppressLint; |
4 | 4 | import android.app.FragmentManager; |
5 | 5 | import android.app.FragmentTransaction; |
6 | 6 | import android.content.Context; |
7 | +import android.graphics.Color; | |
7 | 8 | import android.os.Bundle; |
8 | 9 | import android.text.TextUtils; |
9 | 10 | import android.util.DisplayMetrics; |
... | ... | @@ -72,6 +73,7 @@ public class ResultElectionFragment extends BaseFragment { |
72 | 73 | ; |
73 | 74 | } |
74 | 75 | }); |
76 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#042160")); | |
75 | 77 | initData(); |
76 | 78 | initView(); |
77 | 79 | ImageButton btnBack = (ImageButton) view.findViewById(R.id.fragment_result_election_btn_back); |
... | ... | @@ -118,21 +120,21 @@ public class ResultElectionFragment extends BaseFragment { |
118 | 120 | TextView tvOppose= (TextView) view.findViewById(R.id.fragment_result_election_oppose_num); |
119 | 121 | TextView tvAbstant= (TextView) view.findViewById(R.id.fragment_result_election_abstant_num); |
120 | 122 | TextView tvIndexName= (TextView) view.findViewById(R.id.fragment_result_election_num); |
121 | - TextView tv_to_be= (TextView) view.findViewById(R.id.tv_to_be); | |
122 | - TextView tv_to= (TextView) view.findViewById(R.id.tv_to); | |
123 | + TextView tv_to_be= (TextView) view.findViewById(R.id.yingdaoresult); | |
124 | + TextView tv_to= (TextView) view.findViewById(R.id.shidaoresult); | |
123 | 125 | |
124 | 126 | if(goToBe!=0xff && goToBe!=0xffff){ |
125 | 127 | tv_to_be.setVisibility(View.VISIBLE); |
126 | - tv_to_be.setText(getString(R.string.yindao)+goToBe); | |
128 | + tv_to_be.setText("" + goToBe); | |
127 | 129 | }else{ |
128 | - tv_to_be.setVisibility(View.INVISIBLE); | |
130 | + tv_to_be.setVisibility(View.GONE); | |
129 | 131 | } |
130 | 132 | |
131 | 133 | if(goTo!=0xff && goTo!=0xffff){ |
132 | 134 | tv_to.setVisibility(View.VISIBLE); |
133 | - tv_to.setText(getString(R.string.shidao)+goTo); | |
135 | + tv_to.setText("" + goTo); | |
134 | 136 | }else{ |
135 | - tv_to.setVisibility(View.INVISIBLE); | |
137 | + tv_to.setVisibility(View.GONE); | |
136 | 138 | } |
137 | 139 | |
138 | 140 | if(indexNameModel==0){ |
... | ... | @@ -152,15 +154,15 @@ public class ResultElectionFragment extends BaseFragment { |
152 | 154 | }else if(resultSelectModel==1){ |
153 | 155 | tvAgree.setVisibility(View.VISIBLE); |
154 | 156 | tvOppose.setVisibility(View.VISIBLE); |
155 | - tvAbstant.setVisibility(View.INVISIBLE); | |
157 | + tvAbstant.setVisibility(View.GONE); | |
156 | 158 | }else if(resultSelectModel==2){ |
157 | 159 | tvAgree.setVisibility(View.VISIBLE); |
158 | - tvOppose.setVisibility(View.INVISIBLE); | |
160 | + tvOppose.setVisibility(View.GONE); | |
159 | 161 | tvAbstant.setVisibility(View.VISIBLE); |
160 | 162 | }else if(resultSelectModel==3){ |
161 | 163 | tvAgree.setVisibility(View.VISIBLE); |
162 | - tvOppose.setVisibility(View.INVISIBLE); | |
163 | - tvAbstant.setVisibility(View.INVISIBLE); | |
164 | + tvOppose.setVisibility(View.GONE); | |
165 | + tvAbstant.setVisibility(View.GONE); | |
164 | 166 | } |
165 | 167 | listview = (ListView) view.findViewById(R.id.fragment_result_election_list); |
166 | 168 | } |
... | ... | @@ -394,15 +396,15 @@ public class ResultElectionFragment extends BaseFragment { |
394 | 396 | }else if(resultSelectModel==1){ |
395 | 397 | holder.tvAgree.setVisibility(View.VISIBLE); |
396 | 398 | holder.tvOppose.setVisibility(View.VISIBLE); |
397 | - holder.tvAbstant.setVisibility(View.INVISIBLE); | |
399 | + holder.tvAbstant.setVisibility(View.GONE); | |
398 | 400 | }else if(resultSelectModel==2){ |
399 | 401 | holder.tvAgree.setVisibility(View.VISIBLE); |
400 | - holder.tvOppose.setVisibility(View.INVISIBLE); | |
402 | + holder.tvOppose.setVisibility(View.GONE); | |
401 | 403 | holder.tvAbstant.setVisibility(View.VISIBLE); |
402 | 404 | }else if(resultSelectModel==3){ |
403 | 405 | holder.tvAgree.setVisibility(View.VISIBLE); |
404 | - holder.tvOppose.setVisibility(View.INVISIBLE); | |
405 | - holder.tvAbstant.setVisibility(View.INVISIBLE); | |
406 | + holder.tvOppose.setVisibility(View.GONE); | |
407 | + holder.tvAbstant.setVisibility(View.GONE); | |
406 | 408 | } |
407 | 409 | ResultItem it = aryList.get(position); |
408 | 410 | holder.tvNum.setText(String.valueOf(it.nameIndex)); | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ResultVoteFragment.java
... | ... | @@ -11,6 +11,7 @@ import android.widget.LinearLayout; |
11 | 11 | import android.widget.TextView; |
12 | 12 | |
13 | 13 | import com.sunvote.util.LogUtil; |
14 | +import com.sunvote.xpadapp.MainActivity; | |
14 | 15 | import com.sunvote.xpadapp.R; |
15 | 16 | import com.sunvote.xpadapp.base.BaseFragment; |
16 | 17 | import com.sunvote.xpadcomm.XPadApiInterface; |
... | ... | @@ -85,7 +86,7 @@ public class ResultVoteFragment extends BaseFragment { |
85 | 86 | shidaoresult = root.findViewById(R.id.shidaoresult); |
86 | 87 | fragmentResultMemo = root.findViewById(R.id.fragment_result_memo); |
87 | 88 | fragmentMemo = root.findViewById(R.id.fragment_memo); |
88 | - | |
89 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#042160")); | |
89 | 90 | tResult = root.findViewById(R.id.t_result); |
90 | 91 | dResult = root.findViewById(R.id.d_result); |
91 | 92 | pResult = root.findViewById(R.id.p_result); | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/SinginResultFragment.java
1 | 1 | package com.sunvote.xpadapp.fragments; |
2 | 2 | |
3 | +import android.graphics.Color; | |
3 | 4 | import android.os.Bundle; |
4 | 5 | import android.view.LayoutInflater; |
5 | 6 | import android.view.View; |
6 | 7 | import android.view.ViewGroup; |
7 | 8 | import android.widget.TextView; |
8 | 9 | |
10 | +import com.sunvote.xpadapp.MainActivity; | |
9 | 11 | import com.sunvote.xpadapp.R; |
10 | 12 | import com.sunvote.xpadapp.base.BaseFragment; |
11 | 13 | import com.sunvote.xpadcomm.XPadApiInterface.VoteInfo; |
12 | 14 | |
15 | +import org.apache.tools.ant.Main; | |
16 | + | |
13 | 17 | public class SinginResultFragment extends BaseFragment { |
14 | 18 | |
15 | 19 | private VoteInfo.ResultInfo resultInfo; |
... | ... | @@ -27,6 +31,7 @@ public class SinginResultFragment extends BaseFragment { |
27 | 31 | shidaoresult.setText("" + resultInfo.num3); |
28 | 32 | yingdaoresult.setText("" + resultInfo.num2); |
29 | 33 | weidaoresult.setText("" + resultInfo.num1); |
34 | + ((MainActivity)getActivity()).setBackgroundColor(Color.parseColor("#042160")); | |
30 | 35 | if ((resultInfo.bits & 0xF) == 0xF) { |
31 | 36 | result.setText(""); |
32 | 37 | } else if ((resultInfo.bits & 0xF) == 0) { | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/SingleTitleFragment.java
... | ... | @@ -3,6 +3,7 @@ package com.sunvote.xpadapp.fragments; |
3 | 3 | import android.annotation.TargetApi; |
4 | 4 | import android.app.FragmentManager; |
5 | 5 | import android.app.FragmentTransaction; |
6 | +import android.graphics.Color; | |
6 | 7 | import android.os.Build; |
7 | 8 | import android.os.Bundle; |
8 | 9 | import android.os.Handler; |
... | ... | @@ -126,6 +127,7 @@ public class SingleTitleFragment extends BaseFragment implements ContentVoteOnBa |
126 | 127 | votetype = view.findViewById(R.id.votetype); |
127 | 128 | initOptions(); |
128 | 129 | mact = (MainActivity) getActivity(); |
130 | + mact.setBackgroundColor(Color.parseColor("#450603")); | |
129 | 131 | view.setOnClickListener(new OnClickListener() { |
130 | 132 | |
131 | 133 | @Override | ... | ... |
C5/app/src/main/java/com/sunvote/xpadapp/fragments/UserResultVoteFragment.java
... | ... | @@ -130,6 +130,9 @@ public class UserResultVoteFragment extends BaseFragment { |
130 | 130 | } |
131 | 131 | |
132 | 132 | private void setView(int pos, int digiters, int bitNum, int type) { |
133 | + tResult.removeAllViews(); | |
134 | + dResult.removeAllViews(); | |
135 | + pResult.removeAllViews(); | |
133 | 136 | LinearLayout.LayoutParams lp=new LinearLayout.LayoutParams(0,LinearLayout.LayoutParams.WRAP_CONTENT,1.0f); |
134 | 137 | for(int i = 1; i <= options.length ; i++) { |
135 | 138 | if (options.length >= i) { |
... | ... | @@ -161,7 +164,11 @@ public class UserResultVoteFragment extends BaseFragment { |
161 | 164 | if (notVote != 0xff) { |
162 | 165 | tResult.addView(createView(getString(R.string.weian), Color.YELLOW), lp); |
163 | 166 | dResult.addView(createView("" + notVote, Color.WHITE), lp); |
164 | - pResult.addView(createView("0%", Color.WHITE), lp); | |
167 | + if ((fenmu > 0 && fenmu != 0xff)) { | |
168 | + pResult.addView(createView("0%", Color.WHITE), lp); | |
169 | + }else{ | |
170 | + pResult.setVisibility(View.GONE); | |
171 | + } | |
165 | 172 | } |
166 | 173 | } |
167 | 174 | public static String formatDoubleToString(double value, Integer digits, boolean remove) { | ... | ... |
C5/app/src/main/res/layout/fragment_multi_title.xml
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | android:id="@+id/line_panel" |
9 | 9 | android:layout_width="match_parent" |
10 | 10 | android:layout_height="wrap_content" |
11 | - android:background="@color/red" | |
11 | + android:background="#AC1007" | |
12 | 12 | android:orientation="horizontal" |
13 | 13 | android:paddingBottom="20dp" |
14 | 14 | android:paddingLeft="20dp" | ... | ... |
C5/app/src/main/res/layout/fragment_result_election.xml
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="match_parent" |
5 | 5 | android:background="#ff004586" |
6 | - android:orientation="vertical" | |
7 | - android:paddingRight="50dp"> | |
6 | + android:orientation="vertical"> | |
8 | 7 | |
9 | 8 | <RelativeLayout |
9 | + android:id="@+id/title_linear" | |
10 | 10 | android:layout_width="match_parent" |
11 | 11 | android:layout_height="wrap_content" |
12 | - android:layout_marginTop="@dimen/content_margin"> | |
12 | + android:layout_marginTop="10dp"> | |
13 | 13 | |
14 | 14 | <ImageButton |
15 | 15 | android:id="@+id/fragment_result_election_btn_back" |
16 | 16 | android:layout_width="wrap_content" |
17 | 17 | android:layout_height="wrap_content" |
18 | 18 | android:layout_marginLeft="@dimen/content_margin" |
19 | - android:visibility="invisible" | |
20 | - android:background="@drawable/back_white_selector" /> | |
19 | + android:background="@drawable/back_white_selector" | |
20 | + android:visibility="invisible" /> | |
21 | 21 | |
22 | 22 | <TextView |
23 | 23 | android:id="@+id/fragment_result_election_bill_title" |
... | ... | @@ -26,11 +26,11 @@ |
26 | 26 | android:layout_centerHorizontal="true" |
27 | 27 | android:layout_marginLeft="@dimen/content_margin" |
28 | 28 | android:layout_marginRight="@dimen/content_margin" |
29 | + android:ellipsize="end" | |
29 | 30 | android:gravity="center" |
31 | + android:lines="1" | |
30 | 32 | android:text="@string/vote_election" |
31 | 33 | android:textColor="@color/white" |
32 | - android:lines="1" | |
33 | - android:ellipsize="end" | |
34 | 34 | android:textSize="@dimen/big_text_p3" |
35 | 35 | android:textStyle="bold" /> |
36 | 36 | </RelativeLayout> |
... | ... | @@ -39,138 +39,153 @@ |
39 | 39 | android:id="@+id/fragment_result_election_title" |
40 | 40 | android:layout_width="fill_parent" |
41 | 41 | android:layout_height="wrap_content" |
42 | + android:layout_below="@id/title_linear" | |
42 | 43 | android:layout_centerHorizontal="true" |
43 | 44 | android:layout_marginLeft="@dimen/content_margin" |
44 | 45 | android:layout_marginRight="@dimen/content_margin" |
45 | - android:layout_marginTop="@dimen/content_margin" | |
46 | + android:layout_marginTop="10dp" | |
46 | 47 | android:gravity="center" |
48 | + android:lines="1" | |
47 | 49 | android:text="@string/vote_result" |
48 | 50 | android:textColor="@color/white" |
49 | 51 | android:textSize="@dimen/big_text_p3" /> |
50 | 52 | |
51 | 53 | <LinearLayout |
54 | + android:id="@+id/data_title_layout" | |
52 | 55 | android:layout_width="match_parent" |
53 | 56 | android:layout_height="wrap_content" |
54 | - android:layout_marginLeft="@dimen/content_margin" | |
55 | - android:layout_marginRight="@dimen/content_margin" | |
56 | - android:orientation="horizontal"> | |
57 | + android:layout_below="@id/fragment_result_election_title" | |
58 | + android:layout_marginTop="20dp" | |
59 | + android:orientation="horizontal" | |
60 | + android:paddingRight="80dp"> | |
57 | 61 | |
58 | 62 | <TextView |
59 | 63 | android:id="@+id/fragment_result_election_num" |
60 | - android:layout_width="match_parent" | |
64 | + android:layout_width="140dp" | |
61 | 65 | android:layout_height="match_parent" |
62 | - android:layout_centerVertical="true" | |
63 | - android:layout_weight="1" | |
66 | + android:gravity="center" | |
64 | 67 | android:paddingLeft="@dimen/content_margin" |
65 | 68 | android:text="@string/name_index" |
66 | - android:textColor="@color/white" | |
69 | + android:textColor="@color/yellow" | |
67 | 70 | android:textSize="@dimen/big_text_p4" |
68 | 71 | android:textStyle="bold" /> |
69 | 72 | |
70 | 73 | <TextView |
71 | 74 | android:id="@+id/fragment_result_election_name" |
72 | - android:layout_width="match_parent" | |
75 | + android:layout_width="0dp" | |
73 | 76 | android:layout_height="match_parent" |
74 | - android:layout_centerVertical="true" | |
75 | 77 | android:layout_weight="1" |
76 | 78 | android:text="@string/name_xpad" |
77 | - android:textColor="@color/white" | |
79 | + android:textColor="@color/yellow" | |
78 | 80 | android:textSize="@dimen/big_text_p4" |
79 | 81 | android:textStyle="bold" /> |
80 | 82 | |
81 | 83 | <TextView |
82 | 84 | android:id="@+id/fragment_result_election_agree_num" |
83 | - android:layout_width="match_parent" | |
85 | + android:layout_width="140dp" | |
84 | 86 | android:layout_height="match_parent" |
85 | - android:layout_alignParentRight="true" | |
86 | - android:layout_centerVertical="true" | |
87 | - android:layout_weight="1" | |
87 | + android:gravity="center" | |
88 | 88 | android:text="@string/agree_num" |
89 | - android:textColor="@color/white" | |
89 | + android:textColor="@color/yellow" | |
90 | 90 | android:textSize="@dimen/big_text_p4" |
91 | 91 | android:textStyle="bold" /> |
92 | 92 | |
93 | 93 | <TextView |
94 | 94 | android:id="@+id/fragment_result_election_oppose_num" |
95 | - android:layout_width="match_parent" | |
95 | + android:layout_width="140dp" | |
96 | 96 | android:layout_height="match_parent" |
97 | - android:layout_alignParentRight="true" | |
98 | - android:layout_centerVertical="true" | |
99 | - android:layout_weight="1" | |
97 | + android:gravity="center" | |
100 | 98 | android:text="@string/oppose_num" |
101 | - android:textColor="@color/white" | |
99 | + android:textColor="@color/yellow" | |
102 | 100 | android:textSize="@dimen/big_text_p4" |
103 | 101 | android:textStyle="bold" /> |
104 | 102 | |
105 | 103 | <TextView |
106 | 104 | android:id="@+id/fragment_result_election_abstant_num" |
107 | - android:layout_width="match_parent" | |
105 | + android:layout_width="140dp" | |
108 | 106 | android:layout_height="match_parent" |
109 | - android:layout_alignParentRight="true" | |
110 | - android:layout_centerVertical="true" | |
111 | - android:layout_weight="1" | |
107 | + android:gravity="center" | |
112 | 108 | android:text="@string/abstant_num" |
113 | - android:textColor="@color/white" | |
109 | + android:textColor="@color/yellow" | |
114 | 110 | android:textSize="@dimen/big_text_p4" |
115 | 111 | android:textStyle="bold" /> |
116 | 112 | |
117 | 113 | <TextView |
118 | 114 | android:id="@+id/fragment_result_election_result" |
119 | - android:layout_width="match_parent" | |
115 | + android:layout_width="140dp" | |
120 | 116 | android:layout_height="match_parent" |
121 | 117 | android:layout_alignParentRight="true" |
122 | 118 | android:layout_centerVertical="true" |
123 | - android:layout_marginLeft="20px" | |
124 | - android:layout_weight="1" | |
119 | + android:gravity="center" | |
125 | 120 | android:text="@string/result" |
126 | - android:textColor="@color/white" | |
121 | + android:textColor="@color/yellow" | |
127 | 122 | android:textSize="@dimen/big_text_p4" |
128 | 123 | android:textStyle="bold" /> |
129 | 124 | </LinearLayout> |
130 | 125 | |
131 | 126 | <LinearLayout |
132 | - android:layout_width="match_parent" | |
133 | - android:layout_height="match_parent" | |
134 | - android:orientation="vertical"> | |
127 | + android:id="@+id/bottom_linear" | |
128 | + android:layout_width="800dp" | |
129 | + android:layout_height="wrap_content" | |
130 | + android:layout_centerHorizontal="true" | |
131 | + android:layout_alignParentBottom="true" | |
132 | + android:layout_marginBottom="20dp" | |
133 | + android:orientation="horizontal"> | |
135 | 134 | |
136 | - <ListView | |
137 | - android:id="@+id/fragment_result_election_list" | |
138 | - android:layout_width="match_parent" | |
139 | - android:layout_height="match_parent" | |
140 | - android:layout_marginBottom="@dimen/content_margin" | |
141 | - android:layout_marginLeft="@dimen/content_margin" | |
142 | - android:layout_marginRight="@dimen/content_margin" | |
143 | - android:layout_marginTop="@dimen/content_margin" | |
144 | - android:layout_weight="0.1" | |
145 | - android:divider="@color/votebakground" | |
146 | - android:dividerHeight="1dp"/> | |
135 | + <TextView | |
136 | + android:layout_width="wrap_content" | |
137 | + android:layout_height="wrap_content" | |
138 | + android:layout_weight="1" | |
139 | + android:gravity="right" | |
140 | + android:text="@string/yindao1" | |
141 | + android:textColor="@color/yellow" | |
142 | + android:textSize="@dimen/big_text_p3" | |
143 | + android:textStyle="bold" /> | |
144 | + | |
145 | + <TextView | |
146 | + android:id="@+id/yingdaoresult" | |
147 | + android:layout_width="wrap_content" | |
148 | + android:layout_height="wrap_content" | |
149 | + android:layout_marginLeft="10dp" | |
150 | + android:layout_marginRight="60dp" | |
151 | + android:layout_weight="1" | |
152 | + android:gravity="left" | |
153 | + android:text="150" | |
154 | + android:textColor="@color/white" | |
155 | + android:textSize="@dimen/big_text_p3" /> | |
156 | + | |
157 | + <TextView | |
158 | + android:layout_width="wrap_content" | |
159 | + android:layout_height="wrap_content" | |
160 | + android:layout_marginLeft="60dp" | |
161 | + android:layout_weight="1" | |
162 | + android:gravity="right" | |
163 | + android:text="@string/shidao1" | |
164 | + android:textColor="@color/yellow" | |
165 | + android:textSize="@dimen/big_text_p3" | |
166 | + android:textStyle="bold" /> | |
167 | + | |
168 | + <TextView | |
169 | + android:id="@+id/shidaoresult" | |
170 | + android:layout_width="wrap_content" | |
171 | + android:layout_height="wrap_content" | |
172 | + android:layout_marginLeft="10dp" | |
173 | + android:layout_weight="1" | |
174 | + android:gravity="left" | |
175 | + android:text="150" | |
176 | + android:textColor="@color/white" | |
177 | + android:textSize="@dimen/big_text_p3" /> | |
147 | 178 | |
148 | - <LinearLayout | |
149 | - android:layout_width="match_parent" | |
150 | - android:layout_height="match_parent" | |
151 | - android:layout_marginLeft="@dimen/linear_heigh" | |
152 | - android:layout_marginRight="@dimen/linear_heigh" | |
153 | - android:orientation="horizontal" | |
154 | - android:layout_weight="0.3"> | |
155 | - <TextView | |
156 | - android:id="@+id/tv_to_be" | |
157 | - android:layout_width="0dp" | |
158 | - android:layout_height="wrap_content" | |
159 | - android:layout_weight="1" | |
160 | - android:gravity="left" | |
161 | - android:text="@string/yindao" | |
162 | - android:textColor="@color/white" | |
163 | - android:textSize="@dimen/big_text_p3" /> | |
164 | - | |
165 | - <TextView | |
166 | - android:id="@+id/tv_to" | |
167 | - android:layout_width="0dp" | |
168 | - android:layout_height="wrap_content" | |
169 | - android:layout_weight="1" | |
170 | - android:gravity="right" | |
171 | - android:text="@string/shidao" | |
172 | - android:textColor="@color/white" | |
173 | - android:textSize="@dimen/big_text_p3" /> | |
174 | - </LinearLayout> | |
175 | 179 | </LinearLayout> |
176 | -</LinearLayout> | |
177 | 180 | \ No newline at end of file |
181 | + | |
182 | + <ListView | |
183 | + android:id="@+id/fragment_result_election_list" | |
184 | + android:layout_width="match_parent" | |
185 | + android:layout_height="match_parent" | |
186 | + android:layout_above="@id/bottom_linear" | |
187 | + android:layout_below="@id/data_title_layout" | |
188 | + android:layout_marginBottom="@dimen/content_margin" | |
189 | + android:divider="@color/votebakground" | |
190 | + android:dividerHeight="1dp" /> | |
191 | + | |
192 | +</RelativeLayout> | |
178 | 193 | \ No newline at end of file | ... | ... |
C5/app/src/main/res/layout/list_result_election_item.xml
... | ... | @@ -2,81 +2,68 @@ |
2 | 2 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | android:layout_width="match_parent" |
4 | 4 | android:layout_height="wrap_content" |
5 | + android:layout_marginBottom="@dimen/content_margin" | |
5 | 6 | android:layout_marginTop="@dimen/content_margin" |
6 | - android:layout_marginBottom="@dimen/content_margin"> | |
7 | - | |
7 | + android:paddingRight="80dp"> | |
8 | 8 | |
9 | 9 | <TextView |
10 | 10 | android:id="@+id/item_result_election_num" |
11 | - android:layout_width="match_parent" | |
11 | + android:layout_width="140dp" | |
12 | 12 | android:layout_height="match_parent" |
13 | 13 | android:layout_centerVertical="true" |
14 | + android:gravity="center" | |
15 | + android:paddingLeft="@dimen/content_margin" | |
14 | 16 | android:text="@string/name_index" |
15 | 17 | android:textColor="@color/white" |
16 | 18 | android:textSize="@dimen/big_text_p4" |
17 | - android:paddingLeft="@dimen/content_margin" | |
18 | - android:layout_weight="1" | |
19 | 19 | android:textStyle="bold" /> |
20 | 20 | |
21 | 21 | <TextView |
22 | 22 | android:id="@+id/item_result_election_name" |
23 | - android:layout_width="match_parent" | |
23 | + android:layout_width="0dp" | |
24 | 24 | android:layout_height="match_parent" |
25 | - android:layout_centerVertical="true" | |
25 | + android:layout_weight="1" | |
26 | 26 | android:text="@string/name_xpad" |
27 | 27 | android:textColor="@color/white" |
28 | 28 | android:textSize="@dimen/big_text_p4" |
29 | - android:layout_weight="1" | |
30 | 29 | android:textStyle="bold" /> |
31 | 30 | |
32 | 31 | <TextView |
33 | 32 | android:id="@+id/item_result_election_agree" |
34 | - android:layout_width="match_parent" | |
33 | + android:layout_width="140dp" | |
35 | 34 | android:layout_height="match_parent" |
36 | - android:layout_alignParentRight="true" | |
37 | - android:layout_centerVertical="true" | |
35 | + android:gravity="center" | |
38 | 36 | android:text="@string/agree_num" |
39 | 37 | android:textColor="@color/white" |
40 | - android:layout_weight="1" | |
41 | 38 | android:textSize="@dimen/big_text_p4" |
42 | - android:gravity="center" | |
43 | 39 | android:textStyle="bold" /> |
44 | 40 | |
45 | 41 | <TextView |
46 | 42 | android:id="@+id/item_result_election_oppose_num" |
47 | - android:layout_width="match_parent" | |
43 | + android:layout_width="140dp" | |
48 | 44 | android:layout_height="match_parent" |
49 | - android:layout_alignParentRight="true" | |
50 | - android:layout_centerVertical="true" | |
45 | + android:gravity="center" | |
51 | 46 | android:text="@string/oppose_num" |
52 | 47 | android:textColor="@color/white" |
53 | - android:layout_weight="1" | |
54 | - android:gravity="center" | |
55 | 48 | android:textSize="@dimen/big_text_p4" |
56 | 49 | android:textStyle="bold" /> |
57 | 50 | |
58 | 51 | <TextView |
59 | 52 | android:id="@+id/item_result_election_abstant_num" |
60 | - android:layout_width="match_parent" | |
53 | + android:layout_width="140dp" | |
61 | 54 | android:layout_height="match_parent" |
62 | - android:layout_alignParentRight="true" | |
63 | - android:layout_centerVertical="true" | |
64 | - android:layout_weight="1" | |
55 | + android:gravity="center" | |
65 | 56 | android:text="@string/abstant_num" |
66 | 57 | android:textColor="@color/white" |
67 | 58 | android:textSize="@dimen/big_text_p4" |
68 | - android:gravity="center" | |
69 | 59 | android:textStyle="bold" /> |
70 | 60 | |
71 | 61 | <TextView |
72 | 62 | android:id="@+id/item_result_election_result" |
73 | - android:layout_width="match_parent" | |
63 | + android:layout_width="140dp" | |
74 | 64 | android:layout_height="match_parent" |
75 | - android:layout_alignParentRight="true" | |
76 | - android:layout_centerVertical="true" | |
65 | + android:gravity="center" | |
77 | 66 | android:text="@string/result" |
78 | - android:layout_weight="1" | |
79 | - android:paddingLeft="@dimen/content_margin" | |
80 | 67 | android:textColor="@color/white" |
81 | 68 | android:textSize="@dimen/big_text_p4" |
82 | 69 | android:textStyle="bold" /> | ... | ... |
C5/app/src/main/res/values/color.xml
... | ... | @@ -160,6 +160,8 @@ |
160 | 160 | <color name="mediumblue">#0000CD</color> <!--中兰色 --> |
161 | 161 | <color name="darkblue">#00008B</color> <!--暗蓝色 --> |
162 | 162 | <color name="navy">#000080</color> <!--海军色 --> |
163 | - <color name="black">#000000</color> <!--黑色 --> | |
163 | + <color name="black">#000000</color> <!--黑色 --> | |
164 | + | |
165 | + <color name="titile_background_1">#450603</color> | |
164 | 166 | |
165 | 167 | </resources> |
166 | 168 | \ No newline at end of file | ... | ... |