Commit b2831b060134aff8a76ebaaaad470b61230a186d
1 parent
956a8f0a
修改选举提示方式
Showing
1 changed file
with
3 additions
and
3 deletions
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
| @@ -427,14 +427,14 @@ public class ElectionFragment extends BaseFragment { | @@ -427,14 +427,14 @@ public class ElectionFragment extends BaseFragment { | ||
| 427 | if (voteInfo.less == 1) { // | 427 | if (voteInfo.less == 1) { // | 
| 428 | int selCnt = getSelectCount(); | 428 | int selCnt = getSelectCount(); | 
| 429 | if (selCnt < voteInfo.select) { | 429 | if (selCnt < voteInfo.select) { | 
| 430 | - Toast.makeText(mMainActivity, getString(R.string.need_select) + voteInfo.select + getString(R.string.person_can_submit), Toast.LENGTH_SHORT).show(); | 430 | + ToastAlertDialog.makeText(mMainActivity, getString(R.string.need_select) + voteInfo.select + getString(R.string.person_can_submit)).show(); | 
| 431 | btnConfirm.setEnabled(true); | 431 | btnConfirm.setEnabled(true); | 
| 432 | return; | 432 | return; | 
| 433 | } | 433 | } | 
| 434 | }else if(voteInfo.less == 2){ //允许少选,但限定最少必选人数 | 434 | }else if(voteInfo.less == 2){ //允许少选,但限定最少必选人数 | 
| 435 | int selCnt = getSelectCount(); | 435 | int selCnt = getSelectCount(); | 
| 436 | if (selCnt < voteInfo.minSelect) { | 436 | if (selCnt < voteInfo.minSelect) { | 
| 437 | - Toast.makeText(mMainActivity, getString(R.string.need_select) + voteInfo.minSelect + getString(R.string.person_can_submit), Toast.LENGTH_SHORT).show(); | 437 | + ToastAlertDialog.makeText(mMainActivity, getString(R.string.need_select) + voteInfo.minSelect + getString(R.string.person_can_submit)).show(); | 
| 438 | btnConfirm.setEnabled(true); | 438 | btnConfirm.setEnabled(true); | 
| 439 | return; | 439 | return; | 
| 440 | } | 440 | } | 
| @@ -442,7 +442,7 @@ public class ElectionFragment extends BaseFragment { | @@ -442,7 +442,7 @@ public class ElectionFragment extends BaseFragment { | ||
| 442 | 442 | ||
| 443 | if(votedCount> voteInfo.select ){ | 443 | if(votedCount> voteInfo.select ){ | 
| 444 | btnConfirm.setEnabled(true); | 444 | btnConfirm.setEnabled(true); | 
| 445 | - Toast.makeText(getActivity(), getString(R.string.max_select)+voteInfo.select+getString(R.string.person), Toast.LENGTH_SHORT).show(); | 445 | + ToastAlertDialog.makeText(getActivity(), getString(R.string.max_select)+voteInfo.select+getString(R.string.person)).show(); | 
| 446 | checkVoted(); | 446 | checkVoted(); | 
| 447 | return; | 447 | return; | 
| 448 | } | 448 | } | 
