From 389d1e5aedc99a3909c61db855b18a2936919942 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期四, 07 三月 2024 14:37:59 +0800
Subject: [PATCH] 修复设置电量单价时没有保留三位小数的bug
---
app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
index 650415d..e8ed9d6 100644
--- a/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
+++ b/app/src/main/java/com/dayu/recharge/tools/NfcReadHelper.java
@@ -1,5 +1,6 @@
package com.dayu.recharge.tools;
+import android.app.Activity;
import android.content.Intent;
import android.nfc.NfcAdapter;
import android.nfc.Tag;
@@ -11,7 +12,6 @@
import java.io.IOException;
import java.util.ArrayList;
-
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -29,7 +29,8 @@
private static NfcReadHelper helper;
- public NfcReadHelper(Intent intent) {
+ public NfcReadHelper(Intent intent, Activity activity) {
+ super(activity);
this.tag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
}
@@ -40,9 +41,9 @@
* @param intent
* @return
*/
- public static NfcReadHelper getInstence(Intent intent) {
+ public static NfcReadHelper getInstence(Intent intent, Activity activity) {
if (helper == null) {
- helper = new NfcReadHelper(intent);
+ helper = new NfcReadHelper(intent, activity);
}
return helper;
}
--
Gitblit v1.8.0