| | |
| | | //姓名 |
| | | byte[] nameByte = Arrays.copyOfRange(readData.getBodyBytes(), 7, 19); |
| | | userName = SocketUtil.fromHexString(SocketUtil.bytesToHexClean0(nameByte)); |
| | | binding.rechargeLL.setVisibility(View.VISIBLE); |
| | | binding.rechargeRegistBtn.setVisibility(View.VISIBLE); |
| | | binding.rechargeReadLL.setVisibility(View.GONE); |
| | | binding.rechargeTextLL.setVisibility(View.VISIBLE); |
| | | binding.userName.setText(userName); |
| | | binding.redRemainderBlance.setText(MornyUtil.changeF2Y(balance)); |
| | | binding.redStatu.setText(stateText.toString()); |
| | | binding.redInitCode.setText(initPeasantCode); |
| | | if ("00".equals(state)) { |
| | | stateText.append("启用"); |
| | | binding.rechargeLL.setVisibility(View.VISIBLE); |
| | | binding.rechargeRegistBtn.setVisibility(View.VISIBLE); |
| | | binding.rechargeReadLL.setVisibility(View.GONE); |
| | | binding.rechargeTextLL.setVisibility(View.VISIBLE); |
| | | binding.userName.setText(userName); |
| | | binding.redRemainderBlance.setText(MornyUtil.changeF2Y(balance)); |
| | | binding.redStatu.setText(stateText.toString()); |
| | | binding.redInitCode.setText(initPeasantCode); |
| | | userCard.setState("00"); |
| | | userCard.setBalance(balance); |
| | | binding.redStatu.setText(stateText.toString()); |
| | | return; |
| | | } else if ("01".equals(state)) { |
| | | stateText.append("该卡已被禁用"); |
| | |
| | | } else if ("04".equals(state)) { |
| | | stateText.append("其它"); |
| | | } |
| | | binding.redStatu.setText(stateText.toString()); |
| | | binding.rechargeLL.setVisibility(View.GONE); |
| | | binding.rechargeRegistBtn.setVisibility(View.GONE); |
| | | TipUtil.show(RechargeActivity.this, stateText.toString()); |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | protected void onDestroy() { |
| | | super.onDestroy(); |
| | | rechargeActivity=null; |
| | | } |
| | | } |