Commit 6a5053e0771cb5f4e17fd1a1538e9a7e4c2d0504
1 parent
18faef8d
修复bug -- 选举
Showing
12 changed files
with
33 additions
and
23 deletions
C5/app/src/main/java/com/sunvote/xpadapp/MainActivity.java
| ... | ... | @@ -293,7 +293,7 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 293 | 293 | if(statusBarView!=null){ | 
| 294 | 294 | statusBarView.setStatusSignal(0); | 
| 295 | 295 | statusBarView.setStatusBarBaseId(0); | 
| 296 | - //statusBarView.setStatusCH(0); | |
| 296 | + statusBarView.setStatusCH(0); | |
| 297 | 297 | statusBarView.setStatusWifi(0); | 
| 298 | 298 | statusBarView.setStatusKeyId(0); | 
| 299 | 299 | } | 
| ... | ... | @@ -1377,6 +1377,9 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 1377 | 1377 | @Override | 
| 1378 | 1378 | public void run() { | 
| 1379 | 1379 | service.setVisibility(View.GONE); | 
| 1380 | + if(servicePresent != null){ | |
| 1381 | + servicePresent.dismiss(); | |
| 1382 | + } | |
| 1380 | 1383 | } | 
| 1381 | 1384 | }); | 
| 1382 | 1385 | } | 
| ... | ... | @@ -1651,9 +1654,16 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 1651 | 1654 | } | 
| 1652 | 1655 | |
| 1653 | 1656 | @Override | 
| 1654 | - public void onKeyPadEvent(KeypadInfo info) { | |
| 1657 | + public void onKeyPadEvent(final KeypadInfo info) { | |
| 1655 | 1658 | LogUtil.i(TAG, "onKeyPadEvent"); | 
| 1656 | 1659 | mKeypadInfo = info; | 
| 1660 | + runOnUiThread(new Runnable() { | |
| 1661 | + @Override | |
| 1662 | + public void run() { | |
| 1663 | + statusBarView.setStatusKeyId(info.keyId); | |
| 1664 | + statusBarView.setStatusCH(info.chan); | |
| 1665 | + } | |
| 1666 | + }); | |
| 1657 | 1667 | XPadSystem.setStatusBarPadID(this, info.keyId); | 
| 1658 | 1668 | XPadSystem.setStatusBarChannel(this, info.chan); | 
| 1659 | 1669 | if (info.cmd1 == 8 || info.cmd1 == 9) { | 
| ... | ... | @@ -1666,7 +1676,7 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 1666 | 1676 | } | 
| 1667 | 1677 | |
| 1668 | 1678 | @Override | 
| 1669 | - public void onOnLineEvent(OnLineInfo info) { | |
| 1679 | + public void onOnLineEvent(final OnLineInfo info) { | |
| 1670 | 1680 | |
| 1671 | 1681 | if (info.comError == 1) { | 
| 1672 | 1682 | if (info.comError != mOnlineInfo.comError) { | 
| ... | ... | @@ -1707,7 +1717,10 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 1707 | 1717 | runOnUiThread(new Runnable() { | 
| 1708 | 1718 | @Override | 
| 1709 | 1719 | public void run() { | 
| 1710 | - if(mOnlineInfo != null){ | |
| 1720 | + if(mOnlineInfo != null) { | |
| 1721 | + statusBarView.setStatusBarBaseId(mOnlineInfo.baseId); | |
| 1722 | + statusBarView.setStatusCH(mOnlineInfo.chan); | |
| 1723 | + statusBarView.setStatusSignal(mOnlineInfo.rssi); | |
| 1711 | 1724 | setTerminalId(mOnlineInfo.keyId); | 
| 1712 | 1725 | } | 
| 1713 | 1726 | } | 
| ... | ... | @@ -1717,7 +1730,6 @@ public class MainActivity extends BaseActivity implements ComListener { | 
| 1717 | 1730 | XPadSystem.setStatusBarBaseId(this, getString(R.string.base_id) + ":" + info.baseId); | 
| 1718 | 1731 | XPadSystem.setStatusBarSingal(this, info.rssi); | 
| 1719 | 1732 | |
| 1720 | - | |
| 1721 | 1733 | } | 
| 1722 | 1734 | |
| 1723 | 1735 | ... | ... | 
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionCustomFragment.java
| ... | ... | @@ -397,15 +397,16 @@ public class ElectionCustomFragment extends BaseFragment { | 
| 397 | 397 | convertView.setBackgroundColor(position % 2 == 0 ? Color.WHITE : Color.parseColor("#E5E5E5")); | 
| 398 | 398 | holder.tvNum.setText(String.valueOf(it.No)); | 
| 399 | 399 | holder.tvName.setText(String.valueOf(it.title)); | 
| 400 | - if (it.result == 4) { | |
| 401 | - holder.RG.clearCheck(); | |
| 402 | - } else if (it.result == 1) { | |
| 400 | + if (it.result == 1) { | |
| 403 | 401 | holder.RG.check(R.id.list_election_item_oo); | 
| 404 | - } else if (it.result == 2) { | |
| 405 | - holder.RG.check(R.id.list_election_item_xx); | |
| 406 | - }else if (it.result == 3) { | |
| 407 | - holder.RG.check(R.id.list_election_item_abstain); | |
| 402 | + } else { | |
| 403 | + holder.RG.clearCheck(); | |
| 408 | 404 | } | 
| 405 | +// else if (it.result == 2) { | |
| 406 | +// holder.RG.check(R.id.list_election_item_xx); | |
| 407 | +// }else if (it.result == 3) { | |
| 408 | +// holder.RG.check(R.id.list_election_item_abstain); | |
| 409 | +// } | |
| 409 | 410 | |
| 410 | 411 | if(it.modifyModel){ | 
| 411 | 412 | holder.btnO.setEnabled(false); | 
| ... | ... | @@ -417,11 +418,11 @@ public class ElectionCustomFragment extends BaseFragment { | 
| 417 | 418 | holder.btnAbstain.setEnabled(true); | 
| 418 | 419 | } | 
| 419 | 420 | |
| 420 | - if(it.result == 1){ | |
| 421 | + /*if(it.result == 1){ | |
| 421 | 422 | holder.btnO.setChecked(true); | 
| 422 | 423 | }else { | 
| 423 | 424 | holder.btnO.setChecked(false); | 
| 424 | - } | |
| 425 | + }*/ | |
| 425 | 426 | |
| 426 | 427 | holder.btnO.setOnClickListener(new OnClickListener() { | 
| 427 | 428 | @Override | ... | ... | 
C5/app/src/main/java/com/sunvote/xpadapp/fragments/ElectionFragment.java
C5/app/src/main/java/com/sunvote/xpadapp/presenter/XPadPresenter.java
C5/app/src/main/java/com/sunvote/xpadcomm/XPadApi.java
| ... | ... | @@ -1523,9 +1523,9 @@ public class XPadApi implements XPadApiInterface { | 
| 1523 | 1523 | info.dataPos = dt[4] & 0xff; | 
| 1524 | 1524 | info.mode = dt[5] & 0xff; | 
| 1525 | 1525 | info.mode1_msgType = dt[6] & 0xff; | 
| 1526 | - if (info.mode != VoteType_Stop) { | |
| 1527 | - serialNumber = 0; | |
| 1528 | - } | |
| 1526 | +// if (info.mode != VoteType_Stop) { | |
| 1527 | +// serialNumber = 0; | |
| 1528 | +// } | |
| 1529 | 1529 | |
| 1530 | 1530 | if (info.mode == VoteType_Stop) { // 停止 | 
| 1531 | 1531 | if (info.mode1_msgType == 2) { // 有结果 | ... | ... | 
C5/app/src/main/res/layout/list_multi_vote_result_item.xml
| ... | ... | @@ -29,7 +29,7 @@ | 
| 29 | 29 | android:layout_gravity="center_vertical" | 
| 30 | 30 | android:layout_marginLeft="10dp" | 
| 31 | 31 | android:layout_weight="1" | 
| 32 | - android:gravity="center" | |
| 32 | + android:gravity="left|center_vertical" | |
| 33 | 33 | android:text="表决标题表决标题表决标题表决标题表决标题表决标题表决标题表决标题" | 
| 34 | 34 | android:textColor="@color/white" | 
| 35 | 35 | android:textSize="@dimen/px40dp" /> | ... | ... | 
C5/app/src/main/res/layout/status_icon_view.xml
| ... | ... | @@ -17,7 +17,6 @@ | 
| 17 | 17 | android:layout_height="match_parent" | 
| 18 | 18 | android:gravity="left|center_vertical" | 
| 19 | 19 | android:layout_weight="1" | 
| 20 | - android:visibility="invisible" | |
| 21 | 20 | android:text="" | 
| 22 | 21 | android:textColor="@android:color/white"/> | 
| 23 | 22 | <com.sunvote.statusbar.view.BarItem | 
| ... | ... | @@ -25,7 +24,6 @@ | 
| 25 | 24 | android:layout_width="wrap_content" | 
| 26 | 25 | android:layout_height="match_parent" | 
| 27 | 26 | android:gravity="left" | 
| 28 | - android:visibility="invisible" | |
| 29 | 27 | android:text="" | 
| 30 | 28 | android:layout_weight="0.1" | 
| 31 | 29 | android:textColor="@android:color/white"/> | 
| ... | ... | @@ -35,7 +33,6 @@ | 
| 35 | 33 | android:layout_height="match_parent" | 
| 36 | 34 | android:gravity="right" | 
| 37 | 35 | android:text="" | 
| 38 | - android:visibility="invisible" | |
| 39 | 36 | android:layout_weight="1" | 
| 40 | 37 | android:textColor="@android:color/white"/> | 
| 41 | 38 | <com.sunvote.statusbar.view.BarItem | ... | ... | 
C5/app/src/main/res/mipmap-hdpi/signal_1.png deleted
16.1 KB
C5/app/src/main/res/mipmap-hdpi/signal_2.png deleted
16.2 KB
C5/app/src/main/res/mipmap-hdpi/signal_3.png deleted
16.2 KB
C5/app/src/main/res/mipmap-hdpi/signal_4.png deleted
16.2 KB
C5/app/src/main/res/mipmap-hdpi/signal_5.png deleted
15.7 KB
