修改初始密码
首页添加联网状态
调整联网loding动画
| | |
| | | isAidl = true; |
| | | AidlUtil.getInstance().connectPrinterService(this); |
| | | initEasySocket(false, null); |
| | | socketConnect(); |
| | | |
| | | CrashReport.initCrashReport(getApplicationContext(), "45551598b8", true); |
| | | } |
| | | |
| | |
| | | // EasySocket.getInstance().subscribeSocketAction(socketActionListener); |
| | | EasySocket.getInstance().subscribeSocketAction(SocketNet.getInstance().socketNet.socketActionListener); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 定时重连服务器 |
| | | */ |
| | | private void socketConnect() { |
| | | |
| | | try { |
| | | TimerTask task = new TimerTask() { |
| | | @Override |
| | | public void run() { |
| | | // TODO Auto-generated method stub |
| | | Message message = new Message(); |
| | | message.what = 1; |
| | | handler.sendMessage(message); |
| | | } |
| | | }; |
| | | // timer.schedule(task, 5000, 1000 * 60 * 3); |
| | | timer.schedule(task, 5000, 1000 * 60 * 3); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | Handler handler = new Handler() { |
| | | @Override |
| | | public void handleMessage(Message msg) { |
| | | // TODO Auto-generated method stub |
| | | // 要做的事情 |
| | | super.handleMessage(msg); |
| | | try { |
| | | SocketNet.getInstance().isConnect(MyApplication.this); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | |
| | | } |
| | |
| | | */ |
| | | |
| | | |
| | | import android.app.Activity; |
| | | import android.app.PendingIntent; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | protected Boolean ifNFCUse(Context context) { |
| | | protected Boolean ifNFCUse(Activity context) { |
| | | if (mNfcAdapter == null) { |
| | | TipUtil.show(context, "设备不支持NFC!"); |
| | | return false; |
| | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | |
| | | import com.dayu.recharge.MyApplication; |
| | | import com.dayu.recharge.R; |
| | | import com.dayu.recharge.databinding.ActivityHomeBinding; |
| | | import com.dayu.recharge.dbBean.AdminDataBean; |
| | | import com.dayu.recharge.utils.TipUtil; |
| | |
| | | setContentView(homeBinding.getRoot()); |
| | | initView(); |
| | | getPermission(); |
| | | rushState(); |
| | | } |
| | | |
| | | private void getPermission() { |
| | |
| | | }); |
| | | } |
| | | |
| | | public void rushState() { |
| | | if (MyApplication.myApplication.isConncet) { |
| | | homeBinding.socketState.setTextColor(getResources().getColor(R.color.title_bg)); |
| | | homeBinding.socketState.setText("已连接数据中心"); |
| | | } else { |
| | | homeBinding.socketState.setTextColor(getResources().getColor(R.color.red)); |
| | | homeBinding.socketState.setText("正在连接数据中心"); |
| | | } |
| | | |
| | | } |
| | | |
| | | private void initView() { |
| | | homeBinding.homeNewCard.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | |
| | | myBinding.myVillageNum.setText("请点击地址信息设置"); |
| | | } |
| | | StringBuilder msgData = new StringBuilder(); |
| | | if (MyApplication.myApplication.isConncet) { |
| | | msgData.append("已连接数据中心"); |
| | | } else { |
| | | msgData.append("未连接数据中心"); |
| | | } |
| | | |
| | | String initCode = DeviceNumberUtils.getDeviceNumber(); |
| | | if (TextUtils.isEmpty(initCode)) { |
| | | msgData.append(",设备未注册"); |
| | | msgData.append("设备未注册"); |
| | | } else { |
| | | msgData.append(",设备已注册,设备注册号:" + initCode); |
| | | msgData.append("设备注册号:" + initCode); |
| | | } |
| | | myBinding.myTestConnect.setText(msgData); |
| | | } catch (Exception e) { |
| | |
| | | import android.os.Handler; |
| | | import android.os.Message; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | | import android.widget.Toast; |
| | | |
| | |
| | | import com.dayu.recharge.utils.DateUtil; |
| | | import com.dayu.recharge.utils.DeviceNumberUtils; |
| | | import com.dayu.recharge.utils.MornyUtil; |
| | | import com.dayu.recharge.utils.MyCommon; |
| | | import com.dayu.recharge.utils.SocketUtil; |
| | | import com.dayu.recharge.utils.TipUtil; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | |
| | | boolean configPowerFlag = false; |
| | | |
| | | UserCardBean userCardBean; |
| | | |
| | | UserCard olduserCard; |
| | | |
| | | String morny; |
| | | String userName; |
| | |
| | | try { |
| | | binding = ActivityWriteTextBinding.inflate(LayoutInflater.from(this)); |
| | | setContentView(binding.getRoot()); |
| | | initView(); |
| | | nfcWreatActivity = this; |
| | | getData(); |
| | | baseApp = (MyApplication) getApplication(); |
| | |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } |
| | | |
| | | private void initView() { |
| | | handler = new Handler(new Handler.Callback() { |
| | | @Override |
| | | public boolean handleMessage(Message msg) { |
| | | switch (msg.what) { |
| | | |
| | | case HAS_USER://判断已写入用户 |
| | | binding.textView.setText("该卡已经写入用户信息,请更换卡片"); |
| | | binding.textView.setTextColor(getResources().getColor(R.color.red)); |
| | | stopAnim(); |
| | | break; |
| | | case NO_USER://没有写过用户继续保存 |
| | | saveData(); |
| | | break; |
| | | default: |
| | | stopAnim(); |
| | | TipUtil.show(NFCWreatActivity.this, "卡片读取失败"); |
| | | break; |
| | | |
| | | } |
| | | return false; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | |
| | | * 检测是否是用户卡,假如是用户卡的话需要检测卡片是否已经开过户,假如已开户则报错不能再写卡假如是用户卡需要 |
| | | */ |
| | | private void checkHasUser() { |
| | | try { |
| | | NfcReadHelper.getInstence(intent) |
| | | .getData(1, 0, new NfcReadHelper.NFCCallByteback() { |
| | | @Override |
| | | public void callBack(byte[] data) { |
| | | Message message = new Message(); |
| | | String type = HexUtil.byteToHex(data[0]).toUpperCase(); |
| | | switch (type) { |
| | | case "A1": |
| | | case "A8": |
| | | case "A2": |
| | | message.what = HAS_USER; |
| | | break; |
| | | default: |
| | | message.what = NO_USER; |
| | | break; |
| | | } |
| | | handler.sendMessage(message); |
| | | } |
| | | |
| | | @Override |
| | | public void error(int code) { |
| | | Message message = new Message(); |
| | | message.what = code; |
| | | handler.sendMessage(message); |
| | | } |
| | | }); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | CrashReport.postCatchedException(e); |
| | | String cardType = NfcReadHelper.getInstence(intent).getCradType(); |
| | | Log.i("NFCWreatActivity", "cardType=" + cardType); |
| | | if (cardType.equals(MyCommon.USER_CARD_TYPE_1) || |
| | | cardType.equals(MyCommon.USER_CARD_TYPE_2) || |
| | | cardType.equals(MyCommon.USER_CARD_TYPE_3) |
| | | ) { |
| | | binding.textView.setText("该卡已经写入用户信息,请更换卡片"); |
| | | binding.textView.setTextColor(getResources().getColor(R.color.red)); |
| | | } else if (cardType.equals("-1")) { |
| | | TipUtil.show(NFCWreatActivity.this, "请勿移动卡片,读卡失败请重试!!"); |
| | | } else { |
| | | Log.i("NFCWreatActivity", "olduserCard!=null saveData"); |
| | | saveData(); |
| | | } |
| | | |
| | | stopAnim(); |
| | | } |
| | | |
| | | |
| | |
| | | || configureDeviceRegistrationCrad != null |
| | | || configurationPowerCard != null) { |
| | | if (userCard != null && TextUtils.isEmpty(morny)) { |
| | | |
| | | userFlag = WriteCardUtils.setUser(intent, userCard); |
| | | } |
| | | if (cleanCard != null) { |
| | | NFCWriteHelper.getInstence(intent).changePasword(1); |
| | | setClean(intent, cleanCard); |
| | | } |
| | | if (manageCard != null) { |
| | |
| | | //用户卡 |
| | | startDetailActivity(userCardBean.getUserName(), "启用"); |
| | | } else if (!TextUtils.isEmpty(morny)) { |
| | | NFCWreatActivity.this.finish(); |
| | | TipUtil.show("充值成功"); |
| | | TipUtil.show(NFCWreatActivity.this, "充值成功", new TipUtil.TipListener() { |
| | | @Override |
| | | public void onCancle() { |
| | | NFCWreatActivity.this.finish(); |
| | | } |
| | | }); |
| | | } else { |
| | | NFCWreatActivity.this.finish(); |
| | | TipUtil.show("写卡成功"); |
| | | TipUtil.show(NFCWreatActivity.this, "写卡成功", new TipUtil.TipListener() { |
| | | @Override |
| | | public void onCancle() { |
| | | NFCWreatActivity.this.finish(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | |
| | | CrashReport.postCatchedException(e); |
| | | } |
| | | } else { |
| | | TipUtil.show("写卡失败"); |
| | | TipUtil.show(NFCWreatActivity.this, "写卡失败"); |
| | | } |
| | | stopAnim(); |
| | | } |
| | | // else if (!TextUtils.isEmpty(morny)) { |
| | | // |
| | | // } |
| | | else if (userCard == null && userCardBean != null) { |
| | | } else if (userCard == null && userCardBean != null) { |
| | | //补卡逻辑 |
| | | selectBalance(userCardBean.getInitPeasantCode()); |
| | | } else { |
| | |
| | | try { |
| | | this.intent = intent; |
| | | startAnim(); |
| | | Log.i("NFCWreatActivity", "isUser:" + isUser); |
| | | if (isUser) { |
| | | checkHasUser(); |
| | | } else if (isRecharge) { |
| | |
| | | |
| | | rechargeBean.setSerial(adminData.getSerial()); |
| | | userCard.setRechargeDate(Calendar.getInstance()); |
| | | rechargeBean.setBalance(MornyUtil.changeF2Y(balance + MornyUtil.changeY2F(morny)) + ""); |
| | | rechargeBean.setBalance(MornyUtil.changeF2Y(balance)); |
| | | rechargeBean.setInitPeasantCode(initPeasantCode); |
| | | rechargeBean.setOrderID(orderId); |
| | | try { |
| | |
| | | @Override |
| | | public void onSocketResponse(SocketData readData) { |
| | | if (CRC8.isCRC8(readData.getOriginDataBytes())) { |
| | | |
| | | StringBuffer stateText = null; |
| | | |
| | | try { |
| | | stateText = new StringBuffer(); |
| | | String state = BcdUtil.bcdToStr(readData.getBodyBytes()[2]); //BCD码00启用 01禁用 02隶属信息不符 03无此卡信息 04其它s |
| | | if (userCard == null) { |
| | | userCard = new UserCard(); |
| | | userCard.setRechargeTimes(0); |
| | | |
| | | ElectricPriceBean electricPriceBean = baseDao.electricPriceDao().findFirst(); |
| | | if (electricPriceBean != null) { |
| | | userCard.setElectricityPrice(electricPriceBean.getPrice()); |
| | |
| | | //补卡逻辑 |
| | | userFlag = WriteCardUtils.setUser(intent, userCard); |
| | | if (userFlag) { |
| | | NFCWreatActivity.this.finish(); |
| | | TipUtil.show(NFCWreatActivity.this, "补卡成功"); |
| | | TipUtil.show(NFCWreatActivity.this, "补卡成功", new TipUtil.TipListener() { |
| | | @Override |
| | | public void onCancle() { |
| | | NFCWreatActivity.this.finish(); |
| | | } |
| | | }); |
| | | } |
| | | return; |
| | | } else if ("01".equals(state)) { |
| | |
| | | userCard.setState("01"); |
| | | userCard.setBalance(balance); |
| | | userFlag = WriteCardUtils.setUser(intent, userCard); |
| | | |
| | | startDetailActivity(name, stateText.toString()); |
| | | |
| | | } else if ("02".equals(state)) { |
| | |
| | | |
| | | import android.Manifest; |
| | | import android.app.Dialog; |
| | | import android.app.ProgressDialog; |
| | | import android.content.Intent; |
| | | import android.os.Bundle; |
| | | import android.text.InputFilter; |
| | |
| | | import android.view.View; |
| | | |
| | | import com.dayu.recharge.utils.DeviceNumberUtils; |
| | | import com.dayu.recharge.view.ProgressDialog; |
| | | import com.msd.ocr.idcard.LibraryInitOCR; |
| | | import com.dayu.recharge.MyApplication; |
| | | import com.dayu.recharge.card.UserCard; |
| | |
| | | TipUtil.show(NewCardActivity.this, "请输入正确身份证号"); |
| | | return; |
| | | } else { |
| | | dialog = ProgressDialog.show(NewCardActivity.this, "", "正在通信请稍后", true, true); |
| | | userCardBean = new UserCardBean(); |
| | | userCardBean.setUserName(userName); |
| | | userCardBean.setDate(date); |
| | |
| | | * 开卡报文 |
| | | */ |
| | | private void initCard() { |
| | | |
| | | ProgressDialog.show(this); |
| | | String initCode = DeviceNumberUtils.getDeviceNumber(); |
| | | if (TextUtils.isEmpty(initCode)) { |
| | | TipUtil.show(this, "设备注册号为空,请先设置IP和管理员地址"); |
| | |
| | | |
| | | @Override |
| | | public void onSocketResponse(SocketData readData) { |
| | | dialog.dismiss(); |
| | | ProgressDialog.dismiss(); |
| | | if (CRC8.isCRC8(readData.getOriginDataBytes())) { |
| | | |
| | | String state = BcdUtil.bcdToStr(readData.getBodyBytes()[26]); //BCD码00成功01身份证已注册02其他原因失败 |
| | |
| | | |
| | | @Override |
| | | public void onSocketError(int code, String msg) { |
| | | dialog.dismiss(); |
| | | ProgressDialog.dismiss(); |
| | | TipUtil.show(NewCardActivity.this, msg); |
| | | } |
| | | }); |
| | |
| | | //姓名 |
| | | byte[] nameByte = Arrays.copyOfRange(readData.getBodyBytes(), 7, 19); |
| | | String name = SocketUtil.fromHexString(SocketUtil.bytesToHexClean0(nameByte)); |
| | | setUserData(name, balance, stateText.toString()); |
| | | |
| | | String state = BcdUtil.bcdToStr(readData.getBodyBytes()[2]); //BCD码00启用 01禁用 02隶属信息不符 03无此卡信息 04其它s |
| | | if ("00".equals(state)) { |
| | | userCard.setBalance(balance); |
| | | userCard.setState("00"); |
| | | |
| | | WriteCardUtils.setUser(intent, userCard); |
| | | stateText.append("启用"); |
| | | } else if ("01".equals(state)) { |
| | |
| | | stateText.append("其它"); |
| | | } |
| | | |
| | | |
| | | setUserData(name, balance, stateText.toString()); |
| | | stopAnim(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | import com.dayu.recharge.utils.MornyUtil; |
| | | import com.dayu.recharge.utils.SocketUtil; |
| | | import com.dayu.recharge.utils.TipUtil; |
| | | import com.dayu.recharge.view.ProgressDialog; |
| | | import com.tencent.bugly.crashreport.CrashReport; |
| | | |
| | | import java.util.Arrays; |
| | |
| | | this.intent = intent; |
| | | userCard = NfcReadHelper.getInstence(intent).getUserCardData(); |
| | | if (userCard != null) { |
| | | |
| | | ProgressDialog.show(this); |
| | | selectBalance(userCard.getInitPeasantCode()); |
| | | } else { |
| | | TipUtil.show(RechargeActivity.this, "卡片读取失败"); |
| | |
| | | SocketNet.getInstance().sendTestMessage(requestBean.pack(), new SocketCallBack() { |
| | | @Override |
| | | public void onSocketResponse(SocketData readData) { |
| | | ProgressDialog.dismiss(); |
| | | if (CRC8.isCRC8(readData.getOriginDataBytes())) { |
| | | StringBuffer stateText = null; |
| | | try { |
| | |
| | | userName = SocketUtil.fromHexString(SocketUtil.bytesToHexClean0(nameByte)); |
| | | 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()); |
| | |
| | | userCard.setBalance(balance); |
| | | return; |
| | | } else if ("01".equals(state)) { |
| | | stateText.append("禁用"); |
| | | stateText.append("该卡已被禁用"); |
| | | userCard.setState("01"); |
| | | userCard.setBalance(balance); |
| | | userFlag = WriteCardUtils.setUser(intent, userCard); |
| | | TipUtil.show("该卡已被禁用"); |
| | | } else if ("02".equals(state)) { |
| | | stateText.append("隶属信息不符"); |
| | | } else if ("03".equals(state)) { |
| | |
| | | } else if ("04".equals(state)) { |
| | | stateText.append("其它"); |
| | | } |
| | | binding.rechargeLL.setVisibility(View.GONE); |
| | | binding.rechargeRegistBtn.setVisibility(View.GONE); |
| | | TipUtil.show(RechargeActivity.this, stateText.toString()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | |
| | | |
| | | @Override |
| | | public void onSocketError(int code, String msg) { |
| | | ProgressDialog.dismiss(); |
| | | TipUtil.show(RechargeActivity.this, msg); |
| | | } |
| | | }); |
| | |
| | | binding.newCardListView.setAdapter(adapter); |
| | | } |
| | | |
| | | EdtDialog edtDialog; |
| | | |
| | | private void setRightButton() { |
| | | titleBar.setOnItemclickListner(ClickType_RIGHT_TEXT, new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | EdtDialog edtDialog = new EdtDialog(ReplacementActivity.this, new EdtDialog.DialogBack() { |
| | | edtDialog = new EdtDialog(ReplacementActivity.this, new EdtDialog.DialogBack() { |
| | | @Override |
| | | public void onOk(String data) { |
| | | List<UserCardBean> beans = baseDao.userCardDao().findByData(data); |
| | |
| | | } else { |
| | | TipUtil.show("未找到该用户"); |
| | | } |
| | | edtDialog.dismiss(); |
| | | } |
| | | |
| | | @Override |
| | | public void onCancel() { |
| | | |
| | | edtDialog.dismiss(); |
| | | } |
| | | }); |
| | | edtDialog.show(); |
| | | } |
| | | }); |
| | | } |
| | |
| | | holder = (ViewHolder) convertView.getTag(); |
| | | } |
| | | holder.userName.setText("用户名:" + rechargeList.get(position).getUserName()); |
| | | holder.userNo.setText("身份证号:" + rechargeList.get(position).getUserId()); |
| | | holder.userNo.setText("用户编号:" + rechargeList.get(position).getInitPeasantCode()); |
| | | holder.morny.setText("充值金额:" + rechargeList.get(position).getMorny()); |
| | | holder.date.setText("日期:" + DateUtil.dateToStamp(rechargeList.get(position).getDate(), DateUtil.type1)); |
| | | return convertView; |
| | |
| | | * @param data |
| | | */ |
| | | public static UserCard getBean(List<byte[]> data) { |
| | | UserCard userCard = new UserCard(); |
| | | if (data != null) { |
| | | byte[] zero = data.get(0); |
| | | byte[] one = data.get(1); |
| | | byte[] two = data.get(2); |
| | | userCard.cardType = HexUtil.byteToHex(zero[0]); |
| | | userCard.rechargeTimes = HexUtil.get16to10(HexUtil.byteToHex(zero[1])); |
| | | byte[] swipeNumberBytes = new byte[2]; |
| | | swipeNumberBytes[0] = zero[2]; |
| | | swipeNumberBytes[1] = zero[3]; |
| | | String swipeNumberHex = HexUtil.bytesToHex(swipeNumberBytes); |
| | | userCard.swipeNumber = (short) HexUtil.get16to10(swipeNumberHex); |
| | | byte[] electricityPriceBytes = new byte[4]; |
| | | for (int i = 0; i < 4; i++) { |
| | | electricityPriceBytes[i] = zero[i + 4]; |
| | | } |
| | | userCard.electricityPrice = HexUtil.hexToFloat(HexUtil.bytesToHex(electricityPriceBytes)); |
| | | userCard.state = BcdUtil.bcdToStr(zero[8]); |
| | | byte[] balanceBytes = new byte[4]; |
| | | for (int i = 0; i < 4; i++) { |
| | | balanceBytes[i] = zero[i + 9]; |
| | | } |
| | | userCard.balance = HexUtil.get16to10(HexUtil.bytesToHex(balanceBytes)); |
| | | |
| | | byte[] addressCodeBytes = new byte[6]; |
| | | addressCodeBytes[0] = zero[13]; |
| | | addressCodeBytes[1] = zero[14]; |
| | | addressCodeBytes[2] = two[11]; |
| | | addressCodeBytes[3] = two[12]; |
| | | addressCodeBytes[4] = two[13]; |
| | | addressCodeBytes[5] = two[14]; |
| | | userCard.addressCode = BcdUtil.bcdToStr(addressCodeBytes); |
| | | |
| | | int year = 0; |
| | | int month = 0; |
| | | int day = 0; |
| | | int hour = 0; |
| | | int minute = 0; |
| | | int second = 0; |
| | | for (int i = 0; i < 6; i++) { |
| | | byte byteData = one[i + 4]; |
| | | switch (i) { |
| | | case 0: |
| | | year = getBcdToInt(byteData); |
| | | break; |
| | | case 1: |
| | | month = getBcdToInt(byteData); |
| | | break; |
| | | case 2: |
| | | day = getBcdToInt(byteData); |
| | | break; |
| | | case 3: |
| | | hour = getBcdToInt(byteData); |
| | | break; |
| | | case 4: |
| | | minute = getBcdToInt(byteData); |
| | | break; |
| | | case 5: |
| | | second = getBcdToInt(byteData); |
| | | break; |
| | | try { |
| | | UserCard userCard = new UserCard(); |
| | | if (data != null) { |
| | | byte[] zero = data.get(0); |
| | | byte[] one = data.get(1); |
| | | byte[] two = data.get(2); |
| | | userCard.cardType = HexUtil.byteToHex(zero[0]); |
| | | userCard.rechargeTimes = HexUtil.get16to10(HexUtil.byteToHex(zero[1])); |
| | | byte[] swipeNumberBytes = new byte[2]; |
| | | swipeNumberBytes[0] = zero[2]; |
| | | swipeNumberBytes[1] = zero[3]; |
| | | String swipeNumberHex = HexUtil.bytesToHex(swipeNumberBytes); |
| | | userCard.swipeNumber = (short) HexUtil.get16to10(swipeNumberHex); |
| | | byte[] electricityPriceBytes = new byte[4]; |
| | | for (int i = 0; i < 4; i++) { |
| | | electricityPriceBytes[i] = zero[i + 4]; |
| | | } |
| | | userCard.electricityPrice = HexUtil.hexToFloat(HexUtil.bytesToHex(electricityPriceBytes)); |
| | | userCard.state = BcdUtil.bcdToStr(zero[8]); |
| | | byte[] balanceBytes = new byte[4]; |
| | | for (int i = 0; i < 4; i++) { |
| | | balanceBytes[i] = zero[i + 9]; |
| | | } |
| | | userCard.balance = HexUtil.get16to10LowHigh(HexUtil.bytesToHex(balanceBytes)); |
| | | |
| | | byte[] addressCodeBytes = new byte[6]; |
| | | addressCodeBytes[0] = zero[13]; |
| | | addressCodeBytes[1] = zero[14]; |
| | | addressCodeBytes[2] = two[11]; |
| | | addressCodeBytes[3] = two[12]; |
| | | addressCodeBytes[4] = two[13]; |
| | | addressCodeBytes[5] = two[14]; |
| | | userCard.addressCode = BcdUtil.bcdToStr(addressCodeBytes); |
| | | |
| | | int year = 0; |
| | | int month = 0; |
| | | int day = 0; |
| | | int hour = 0; |
| | | int minute = 0; |
| | | int second = 0; |
| | | for (int i = 0; i < 6; i++) { |
| | | byte byteData = one[i + 4]; |
| | | switch (i) { |
| | | case 0: |
| | | year = getBcdToInt(byteData); |
| | | break; |
| | | case 1: |
| | | month = getBcdToInt(byteData); |
| | | break; |
| | | case 2: |
| | | day = getBcdToInt(byteData); |
| | | break; |
| | | case 3: |
| | | hour = getBcdToInt(byteData); |
| | | break; |
| | | case 4: |
| | | minute = getBcdToInt(byteData); |
| | | break; |
| | | case 5: |
| | | second = getBcdToInt(byteData); |
| | | break; |
| | | } |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(2000 + year, month, day, hour, minute, second); |
| | | byte[] initPeasantCodeBytes = new byte[16]; |
| | | initPeasantCodeBytes[0] = one[10]; |
| | | initPeasantCodeBytes[1] = one[11]; |
| | | initPeasantCodeBytes[2] = one[12]; |
| | | initPeasantCodeBytes[3] = one[13]; |
| | | initPeasantCodeBytes[4] = one[14]; |
| | | initPeasantCodeBytes[5] = two[0]; |
| | | initPeasantCodeBytes[6] = two[1]; |
| | | initPeasantCodeBytes[7] = two[2]; |
| | | initPeasantCodeBytes[8] = two[3]; |
| | | initPeasantCodeBytes[9] = two[4]; |
| | | initPeasantCodeBytes[10] = two[5]; |
| | | initPeasantCodeBytes[11] = two[6]; |
| | | initPeasantCodeBytes[12] = two[7]; |
| | | initPeasantCodeBytes[13] = two[8]; |
| | | initPeasantCodeBytes[14] = two[9]; |
| | | initPeasantCodeBytes[15] = two[10]; |
| | | userCard.initPeasantCode = HexUtil.bytesToHex(initPeasantCodeBytes); |
| | | return userCard; |
| | | } |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(2000 + year, month, day, hour, minute, second); |
| | | byte[] initPeasantCodeBytes = new byte[16]; |
| | | initPeasantCodeBytes[0] = one[10]; |
| | | initPeasantCodeBytes[1] = one[11]; |
| | | initPeasantCodeBytes[2] = one[12]; |
| | | initPeasantCodeBytes[3] = one[13]; |
| | | initPeasantCodeBytes[4] = one[14]; |
| | | initPeasantCodeBytes[5] = two[0]; |
| | | initPeasantCodeBytes[6] = two[1]; |
| | | initPeasantCodeBytes[7] = two[2]; |
| | | initPeasantCodeBytes[8] = two[3]; |
| | | initPeasantCodeBytes[9] = two[4]; |
| | | initPeasantCodeBytes[10] = two[5]; |
| | | initPeasantCodeBytes[11] = two[6]; |
| | | initPeasantCodeBytes[12] = two[7]; |
| | | initPeasantCodeBytes[13] = two[8]; |
| | | initPeasantCodeBytes[14] = two[9]; |
| | | initPeasantCodeBytes[15] = two[10]; |
| | | userCard.initPeasantCode = HexUtil.bytesToHex(initPeasantCodeBytes); |
| | | return userCard; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | return null; |
| | | } |
| | |
| | | import android.os.Handler; |
| | | import android.util.Log; |
| | | |
| | | import com.dayu.recharge.activity.HomeActivity; |
| | | import com.dayu.recharge.dao.BaseDaoSingleton; |
| | | import com.dayu.recharge.dbBean.AdminDataBean; |
| | | import com.dayu.recharge.dbBean.DeviceNumber; |
| | |
| | | public void onSocketConnSuccess(SocketAddress socketAddress) { |
| | | Log.i("SocketActionListener", "连接成功"); |
| | | MyApplication.myApplication.isConncet = true; |
| | | rushState(); |
| | | DeviceNumber initCode = BaseDaoSingleton.getInstance(MyApplication.myApplication).deviceNumberDao().findFirst(); |
| | | if (initCode == null && !MyApplication.myApplication.isDoInitMachine) { |
| | | new Handler().postDelayed(new Runnable() { |
| | |
| | | // if (dataMessage != null) { |
| | | // EasySocket.getInstance().upMessage(dataMessage); |
| | | // } |
| | | if (isTest) { |
| | | MyApplication.myApplication.isConncet = true; |
| | | // EasySocket.getInstance().disconnect(false); |
| | | } else { |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void onSocketConnFail(SocketAddress socketAddress, boolean isNeedReconnect) { |
| | | MyApplication.myApplication.isConncet = false; |
| | | rushState(); |
| | | Log.i("SocketActionListener", "socket连接失败"); |
| | | if (isTest) { |
| | | // ToastUtil.show(mContext, "连接失败,请检查网络"); |
| | |
| | | @Override |
| | | public void onSocketDisconnect(SocketAddress socketAddress, boolean isNeedReconnect) { |
| | | Log.i("SocketActionListener", "---> socket断开连接,是否需要重连:" + isNeedReconnect); |
| | | |
| | | MyApplication.myApplication.isConncet = false; |
| | | rushState(); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | }; |
| | | |
| | | private void rushState(){ |
| | | if ( HomeActivity.homeActivity!=null){ |
| | | HomeActivity.homeActivity.rushState(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public class BaseNFCHelper { |
| | | /** |
| | | * 默认密码 |
| | | * 默认密码(白卡密码) |
| | | */ |
| | | public byte[] bytes; |
| | | public byte[] defauleKey; |
| | | |
| | | /** |
| | | * 公司密码 |
| | | */ |
| | | public byte[] companyKey; |
| | | |
| | | String companyKeyA; |
| | | String companyKeyB; |
| | | |
| | | |
| | | public BaseNFCHelper() { |
| | | // 解密字符串 |
| | |
| | | cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(encodedKey, "AES")); |
| | | byte[] decryptedBytes = cipher.doFinal(encryptedBytes); |
| | | String decryptedText = new String(decryptedBytes, StandardCharsets.UTF_8); |
| | | bytes = HexUtil.hexToByteArray(decryptedText); |
| | | defauleKey = HexUtil.hexToByteArray(decryptedText); |
| | | |
| | | byte[] encryptedBytes2 = Base64.decode("aYC9feYEOFOQHuzflLIXSw==", Base64.DEFAULT); |
| | | byte[] decryptedBytes2 = cipher.doFinal(encryptedBytes2); |
| | | companyKeyA = new String(decryptedBytes2, StandardCharsets.UTF_8); |
| | | companyKey = HexUtil.hexToByteArray(companyKeyA); |
| | | |
| | | byte[] encryptedBytes3 = Base64.decode("n+SSZFb4DHsreVav/Z5ftg==", Base64.DEFAULT); |
| | | byte[] decryptedBytes3 = cipher.doFinal(encryptedBytes3); |
| | | companyKeyB = new String(decryptedBytes3, StandardCharsets.UTF_8); |
| | | |
| | | } catch (NoSuchAlgorithmException e) { |
| | | throw new RuntimeException(e); |
| | | } catch (NoSuchPaddingException e) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 16进制转10进制高低位转换 |
| | | * @param hex |
| | | * @return |
| | | */ |
| | | public static int get16to10LowHigh(String hex) { |
| | | try { |
| | | String str = ""; |
| | | str = spaceHex(hex); |
| | | str = HighLowHex(str); |
| | | return Integer.parseInt(str, 16); |
| | | } catch (NumberFormatException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 返回特定长度的16进制字符串 |
| | | * |
| | | * @param data |
| | |
| | | import android.nfc.Tag; |
| | | import android.nfc.tech.MifareClassic; |
| | | import android.util.Base64; |
| | | import android.util.Log; |
| | | |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | |
| | | private Tag tag; |
| | | |
| | | private static NFCWriteHelper helper; |
| | | private static int PASSWORD_LENTH = 6; |
| | | private static int PASSWORD_LENTH = 12; |
| | | |
| | | public NFCWriteHelper(Intent intent) { |
| | | this.tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG); |
| | |
| | | public NFCWriteHelper setReadPassword(String str) { |
| | | if (null != str && (str.length() <= PASSWORD_LENTH)) { |
| | | for (int i = 0; i < str.length(); i++) { |
| | | bytes[i] = (byte) str.charAt(i); |
| | | defauleKey[i] = (byte) str.charAt(i); |
| | | } |
| | | } |
| | | return helper; |
| | |
| | | * @param |
| | | */ |
| | | public boolean writeData(byte[] str, int a, int b) { |
| | | Log.i("NFCWreatActivity", "writeData: a=" + a + " b=" + b); |
| | | //写卡时修改所有密码 |
| | | changePasword(a); |
| | | if (str.length <= 16) { |
| | | try { |
| | | MifareClassic mfc = MifareClassic.get(tag); |
| | |
| | | return false; |
| | | } |
| | | //验证扇区密码 |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, bytes); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, defauleKey); |
| | | if (!isOpen) { |
| | | isOpen = mfc.authenticateSectorWithKeyA(a, companyKey); |
| | | } |
| | | if (isOpen) { |
| | | int bIndex = mfc.sectorToBlock(a); |
| | | //写卡 |
| | |
| | | /** |
| | | * 修改密码 |
| | | * |
| | | * @param password 书写密码,16个字节 |
| | | * @param a 书写的扇区 |
| | | * @param callback 返回监听 |
| | | * // * @param callback 返回监听 |
| | | */ |
| | | public void changePasword(String password, int a, final NFCWriteHelper.NFCCallback callback) { |
| | | public boolean changePasword(int a) { |
| | | MifareClassic mfc = MifareClassic.get(tag); |
| | | byte[] data = new byte[16]; |
| | | if (null != mfc) { |
| | | try { |
| | | mfc.connect(); |
| | | if (password.length() != PASSWORD_LENTH) { |
| | | callback.isSusses(false); |
| | | return; |
| | | } |
| | | |
| | | int count = mfc.getSectorCount(); |
| | | if (a > count - 1 || a < 0) { |
| | | callback.isSusses(false); |
| | | return; |
| | | } |
| | | //将密码转换为keyA |
| | | for (int i = 0; i < password.length(); i++) { |
| | | data[i] = (byte) password.charAt(i); |
| | | } |
| | | //将密码转换为KeyB |
| | | for (int i = 0; i < password.length(); i++) { |
| | | data[i + password.length() + 4] = (byte) password.charAt(i); |
| | | } |
| | | //输入控制位 |
| | | data[password.length()] = (byte) 0xff; |
| | | data[password.length() + 1] = (byte) 0x07; |
| | | data[password.length() + 2] = (byte) 0x80; |
| | | data[password.length() + 3] = (byte) 0x69; |
| | | //验证密码 |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, bytes); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, defauleKey); |
| | | //验证是否是默认密码,当默认密码时修改密码 |
| | | if (isOpen) { |
| | | //将密码转换为keyA |
| | | byte[] dataA = HexUtil.hexToByteArray(companyKeyA); |
| | | for (int i = 0; i < dataA.length; i++) { |
| | | data[i] = dataA[i]; |
| | | } |
| | | //输入控制位 |
| | | data[6] = (byte) 0xff; |
| | | data[7] = (byte) 0x07; |
| | | data[8] = (byte) 0x80; |
| | | data[9] = (byte) 0x69; |
| | | byte[] dataB = HexUtil.hexToByteArray(companyKeyB); |
| | | //将密码转换为KeyB |
| | | for (int i = 0; i < dataB.length; i++) { |
| | | data[i + 10] = dataB[i]; |
| | | } |
| | | int bIndex = mfc.sectorToBlock(a); |
| | | int bCount = mfc.getBlockCountInSector(a); |
| | | //写到扇区的最后一个块 |
| | | mfc.writeBlock(bIndex + bCount - 1, data); |
| | | } |
| | | callback.isSusses(true); |
| | | return true; |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | callback.isSusses(false); |
| | | return false; |
| | | // callback.isSusses(false); |
| | | } finally { |
| | | try { |
| | | mfc.close(); |
| | |
| | | } |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | |
| | | import android.nfc.NfcAdapter; |
| | | import android.nfc.Tag; |
| | | import android.nfc.tech.MifareClassic; |
| | | import android.util.Log; |
| | | |
| | | import com.dayu.recharge.card.UserCard; |
| | | import com.dayu.recharge.utils.MyCommon; |
| | |
| | | return helper; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取用户卡信息 |
| | | * |
| | | * @return |
| | | */ |
| | | public UserCard getUserCardData() { |
| | | UserCard userCard = null; |
| | | Map<String, List<byte[]>> map = new HashMap<>(); |
| | |
| | | boolean flag = false; |
| | | List<byte[]> list = new ArrayList<>(); |
| | | //验证扇区密码,否则会报错(链接失败错误) |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(1, bytes); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(1, defauleKey); |
| | | if (!isOpen){ |
| | | isOpen= mfc.authenticateSectorWithKeyA(1, companyKey); |
| | | } |
| | | if (isOpen) { |
| | | //获取扇区里面块的数量 |
| | | int bCount = mfc.getBlockCountInSector(1); |
| | |
| | | return null; |
| | | } |
| | | |
| | | public String getCradType() { |
| | | |
| | | MifareClassic mfc = MifareClassic.get(tag); |
| | | if (null != mfc) { |
| | | try { |
| | | mfc.connect(); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(1, defauleKey); |
| | | if (!isOpen){ |
| | | isOpen= mfc.authenticateSectorWithKeyA(1, companyKey); |
| | | } |
| | | if (isOpen) { |
| | | int bIndex = mfc.sectorToBlock(1); |
| | | byte[] data = mfc.readBlock(bIndex + 0); |
| | | if (data != null && data.length > 0) { |
| | | String hex = HexUtil.byteToHex(data[0]); |
| | | Log.i("NFCWreatActivity", "hex===" + hex); |
| | | return hex; |
| | | } |
| | | |
| | | } else { |
| | | Log.i("NFCWreatActivity", "isOpen===" + isOpen); |
| | | return "-1"; |
| | | } |
| | | } catch (IOException e) { |
| | | return "-1"; |
| | | } finally { |
| | | try { |
| | | mfc.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | /** |
| | | * 读取NFC卡的全部信息 |
| | |
| | | for (int i = 0; i < count; i++) { |
| | | List<byte[]> list = new ArrayList<>(); |
| | | //验证扇区密码,否则会报错(链接失败错误) |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(i, bytes); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(i, defauleKey); |
| | | if (!isOpen){ |
| | | isOpen = mfc.authenticateSectorWithKeyA(i, companyKey); |
| | | } |
| | | if (isOpen) { |
| | | //获取扇区里面块的数量 |
| | | int bCount = mfc.getBlockCountInSector(i); |
| | |
| | | typeS = "TYPE_UNKNOWN"; |
| | | break; |
| | | } |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, bytes); |
| | | boolean isOpen = mfc.authenticateSectorWithKeyA(a, defauleKey); |
| | | if (!isOpen){ |
| | | isOpen = mfc.authenticateSectorWithKeyA(a, companyKey); |
| | | } |
| | | if (isOpen) { |
| | | int bIndex = mfc.sectorToBlock(a); |
| | | byte[] data = mfc.readBlock(bIndex + b); |
| | |
| | | package com.dayu.recharge.utils; |
| | | |
| | | import android.app.Activity; |
| | | import android.content.Context; |
| | | import android.os.Build; |
| | | import android.widget.Toast; |
| | | |
| | | import com.dayu.recharge.MyApplication; |
| | | import com.dayu.recharge.activity.HomeActivity; |
| | | import com.dayu.recharge.view.TipDialog; |
| | | |
| | |
| | | public void onCancle(); |
| | | } |
| | | |
| | | public static void show(Context context, String data) { |
| | | public static void show(Activity mActivity, String data) { |
| | | // Toast.makeText(context, data, Toast.LENGTH_LONG).show(); |
| | | TipDialog tipDialog = new TipDialog(context, data); |
| | | tipDialog.show(); |
| | | try { |
| | | if (!isDestroy(mActivity)) { |
| | | TipDialog tipDialog = new TipDialog(mActivity, data); |
| | | tipDialog.show(); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void show(Context context, String data, TipListener tipListener) { |
| | | public static void show(Activity mActivity, String data, TipListener tipListener) { |
| | | // Toast.makeText(context, data, Toast.LENGTH_LONG).show(); |
| | | TipDialog tipDialog = new TipDialog(context, data, tipListener); |
| | | tipDialog.show(); |
| | | if (!isDestroy(mActivity)) { |
| | | TipDialog tipDialog = new TipDialog(mActivity, data, tipListener); |
| | | tipDialog.show(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public static void show(String data) { |
| | | // Toast.makeText(, data, Toast.LENGTH_LONG).show(); |
| | | TipDialog tipDialog = new TipDialog(HomeActivity.homeActivity, data); |
| | | tipDialog.show(); |
| | | Toast.makeText(MyApplication.myApplication, data, Toast.LENGTH_LONG).show(); |
| | | // TipDialog tipDialog = new TipDialog(HomeActivity.homeActivity, data); |
| | | // tipDialog.show(); |
| | | } |
| | | |
| | | public static void show(String data, TipListener tipListener) { |
| | |
| | | TipDialog tipDialog = new TipDialog(HomeActivity.homeActivity, data, tipListener); |
| | | tipDialog.show(); |
| | | } |
| | | |
| | | /** |
| | | * 判断Activity是否Destroy |
| | | * |
| | | * @param mActivity |
| | | * @return true:已销毁 |
| | | */ |
| | | public static boolean isDestroy(Activity mActivity) { |
| | | if (mActivity == null || |
| | | mActivity.isFinishing() || |
| | | (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && mActivity.isDestroyed())) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | public void onClick(View v) { |
| | | if (intent!=null){ |
| | | if (TextUtils.isEmpty(editText.getText().toString())) { |
| | | TipUtil.show(mContext, "请输入序列号"); |
| | | // TipUtil.show(mContext, "请输入序列号"); |
| | | } else { |
| | | if (Integer.valueOf(editText.getText().toString()) <= 16777215) { |
| | | // EquipmentNumber equipmentNumber = (EquipmentNumber) intent.getSerializableExtra("equipmentNumber"); |
| | |
| | | mContext.startActivity(intent); |
| | | EdtDialog.this.dismiss(); |
| | | } else { |
| | | TipUtil.show(mContext, "输入的数字不能超过16777215"); |
| | | // TipUtil.show(mContext, "输入的数字不能超过16777215"); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.dayu.recharge.view; |
| | | |
| | | import android.app.Activity; |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | |
| | | public class PassWordDialog extends Dialog { |
| | | |
| | | Intent intent; |
| | | Context mContext; |
| | | Activity mContext; |
| | | |
| | | public PassWordDialog(Context context, Intent intent) { |
| | | public PassWordDialog(Activity context, Intent intent) { |
| | | super(context, R.style.ws_pay_showSelfDialog); |
| | | this.intent = intent; |
| | | mContext = context; |
New file |
| | |
| | | package com.dayu.recharge.view; |
| | | |
| | | import android.app.Activity; |
| | | import android.app.Dialog; |
| | | import android.content.Context; |
| | | |
| | | import com.dayu.recharge.activity.NewCardActivity; |
| | | |
| | | /** |
| | | * Created by Android Studio. |
| | | * author: zuo |
| | | * Date: 2023-11-22 |
| | | * Time: 13:33 |
| | | * 备注: |
| | | */ |
| | | public class ProgressDialog { |
| | | static Dialog dialog; |
| | | |
| | | public static void show(Activity activity) { |
| | | dialog = android.app.ProgressDialog.show(activity, "", "正在通信请稍后", true, true); |
| | | } |
| | | |
| | | public static void dismiss() { |
| | | if (dialog != null) { |
| | | dialog.dismiss(); |
| | | dialog = null; |
| | | } |
| | | } |
| | | } |
| | |
| | | <!-- 边缘线的宽度和颜色 --> |
| | | <stroke |
| | | android:width="2px" |
| | | android:color="#b33618" /> |
| | | android:color="@color/title_bg" /> |
| | | |
| | | --> |
| | | <!-- 中间渐变,角度0从左往右,正值为逆时针,270度为从上到下 --> |
| | |
| | | android:textSize="@dimen/home_text_size" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:gravity="bottom|center_horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/socketState" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginBottom="20dp" |
| | | android:text="已连接数据中心" /> |
| | | </LinearLayout> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:hint="请输入信息" |
| | | android:inputType="number" |
| | | android:maxLength="8" |
| | | android:textColor="#000000" /> |
| | | |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:text="身份证号" |
| | | android:text="用户编号" |
| | | android:textSize="14sp" /> |
| | | |
| | | <TextView |
| | |
| | | android:paddingTop="5dp" |
| | | android:paddingRight="15dp" |
| | | android:paddingBottom="5dp" |
| | | android:textColor="#000000" |
| | | android:text="确认" |
| | | android:textSize="@dimen/text_size" /> |
| | | |