diff --git a/C5/app/src/main/AndroidManifest.xml b/C5/app/src/main/AndroidManifest.xml index e7585a4..2441972 100644 --- a/C5/app/src/main/AndroidManifest.xml +++ b/C5/app/src/main/AndroidManifest.xml @@ -4,9 +4,6 @@ package="com.sunvote.xpadapp" android:versionCode="70" android:versionName="1.3.0.0"> - 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 8190308..f405fde 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 @@ -6,6 +6,7 @@ import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.os.Environment; +import android.text.Html; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.text.TextUtils; @@ -155,6 +156,8 @@ public class ElectionFragment extends BaseFragment { } drawView.clear(); addOtherLayout.setVisibility(View.VISIBLE); + tvInfo.setVisibility(View.GONE); + list_election_item_add_btn.setVisibility(View.GONE); } }); addOtherLayout.setOnClickListener(new OnClickListener() { @@ -347,6 +350,8 @@ public class ElectionFragment extends BaseFragment { aryContent.add(aryContent.size() , it); mAdapter.notifyDataSetChanged(); addOtherLayout.setVisibility(View.GONE); + tvInfo.setVisibility(View.VISIBLE); + list_election_item_add_btn.setVisibility(View.VISIBLE); checkVoted(); edtOther.setText(""); } @@ -358,6 +363,8 @@ public class ElectionFragment extends BaseFragment { public void onClick(View v) { edtOther.setText(""); addOtherLayout.setVisibility(View.GONE); + tvInfo.setVisibility(View.VISIBLE); + list_election_item_add_btn.setVisibility(View.VISIBLE); KeyboardUtils.hideSoftInput(getActivity()); } }); @@ -657,7 +664,7 @@ public class ElectionFragment extends BaseFragment { holder.btnX = (RadioButton) convertView.findViewById(R.id.list_election_item_xx);// to holder.RG = (RadioGroup) convertView.findViewById(R.id.list_election_item_radio_group); holder.btnDel = (RadioButton) convertView.findViewById(R.id.list_election_item_del); - holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); + //holder.imgBook = (PhotoView) convertView.findViewById(R.id.img_book); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); @@ -674,21 +681,21 @@ public class ElectionFragment extends BaseFragment { if (it.No > 0) { holder.btnX.setVisibility(View.VISIBLE); - holder.btnDel.setVisibility(View.INVISIBLE); + holder.btnDel.setVisibility(View.GONE); }else { holder.btnX.setVisibility(View.GONE); holder.btnDel.setVisibility(View.VISIBLE); } - String bookImgPath = (String)SharedPreferencesUtil.getData(getActivity(),it.title,""); + /*String bookImgPath = (String)SharedPreferencesUtil.getData(getActivity(),it.title,""); if(!TextUtils.isEmpty(bookImgPath)){ holder.imgBook.setVisibility(View.VISIBLE); Bitmap bitmap = BitmapFactory.decodeFile(bookImgPath); holder.imgBook.setImageBitmap(bitmap); }else{ holder.imgBook.setVisibility(View.GONE); - } + }*/ if(it.modifyModel){ holder.btnO.setEnabled(false); @@ -817,15 +824,20 @@ public class ElectionFragment extends BaseFragment { } } if(voteInfo!=null){ - tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person)); + String s=getString(R.string.should_select1); + String str= String.format("%s%s%s",getString(R.string.should_select1),votedCount,getString(R.string.person)); + tvInfo.setText(Html.fromHtml(str)); + //tvInfo.setText(getString(R.string.should_select1) + votedCount + getString(R.string.person)); } mAdapter.notifyDataSetChanged(); listview.invalidate(); if((aryContent.size()- voteInfo.select) - - + + - + - + diff --git a/C5/app/src/main/res/drawable/darkgrey_round_button.xml b/C5/app/src/main/res/drawable/darkgrey_round_button.xml new file mode 100644 index 0000000..92d9549 --- /dev/null +++ b/C5/app/src/main/res/drawable/darkgrey_round_button.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/C5/app/src/main/res/drawable/green_round_button.xml b/C5/app/src/main/res/drawable/green_round_button.xml new file mode 100644 index 0000000..4f4442f --- /dev/null +++ b/C5/app/src/main/res/drawable/green_round_button.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/C5/app/src/main/res/drawable/oppos_selector.xml b/C5/app/src/main/res/drawable/oppos_selector.xml index 2dd9cd7..0a2e8ff 100644 --- a/C5/app/src/main/res/drawable/oppos_selector.xml +++ b/C5/app/src/main/res/drawable/oppos_selector.xml @@ -1,11 +1,11 @@ - - + + - + - + diff --git a/C5/app/src/main/res/drawable/red_round_button.xml b/C5/app/src/main/res/drawable/red_round_button.xml new file mode 100644 index 0000000..74fe51b --- /dev/null +++ b/C5/app/src/main/res/drawable/red_round_button.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/C5/app/src/main/res/drawable/signin_selector.xml b/C5/app/src/main/res/drawable/signin_selector.xml index d085e8e..4feecf5 100644 --- a/C5/app/src/main/res/drawable/signin_selector.xml +++ b/C5/app/src/main/res/drawable/signin_selector.xml @@ -1,7 +1,6 @@ - @@ -10,5 +9,4 @@ - diff --git a/C5/app/src/main/res/drawable/yellow_round_button.xml b/C5/app/src/main/res/drawable/yellow_round_button.xml new file mode 100644 index 0000000..2848e5a --- /dev/null +++ b/C5/app/src/main/res/drawable/yellow_round_button.xml @@ -0,0 +1,9 @@ + + + + + + + diff --git a/C5/app/src/main/res/layout/fragment_election.xml b/C5/app/src/main/res/layout/fragment_election.xml index 79df4c8..02f27b5 100644 --- a/C5/app/src/main/res/layout/fragment_election.xml +++ b/C5/app/src/main/res/layout/fragment_election.xml @@ -32,17 +32,18 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="20dp" + android:textColor="@color/white" android:text="" android:textSize="@dimen/big_text_p5" />