|
@@ -71,14 +71,14 @@ public class ReportAdapter extends BaseQuickAdapter<ReportJson, ReportViewHolder
|
71
|
71
|
case 2:
|
72
|
72
|
item.setOutmoney((long) Float.parseFloat(typeDataJson.getAccount()));
|
73
|
73
|
data = JavaFormatUtils.getData(item.getOutmoney() / item.getAllMoney() * 100);
|
74
|
|
- helper.money_text.setText(typeDataJson.getAccount()+ "");
|
|
74
|
+ helper.money_text.setText(changeFloatData(Double.parseDouble(typeDataJson.getAccount()))+ "");
|
75
|
75
|
helper.progressBar.setProgress((int) (item.getOutmoney() * 100 / item.getAllMoney()));
|
76
|
76
|
break;
|
77
|
77
|
case 1:
|
78
|
78
|
item.setInmoney((long) Float.parseFloat(typeDataJson.getAccount()));
|
79
|
79
|
data = JavaFormatUtils.getData(item.getInmoney() / item.getAllMoney() * 100);
|
80
|
80
|
// JavaFormatUtils.formatFloatNumber(Float.parseFloat(typeDataJson.getAccount())
|
81
|
|
- helper.money_text.setText(typeDataJson.getAccount() + "");
|
|
81
|
+ helper.money_text.setText(changeFloatData(Double.parseDouble(typeDataJson.getAccount()))+ "");
|
82
|
82
|
helper.progressBar.setProgress((int) (item.getInmoney() * 100 / item.getAllMoney()));
|
83
|
83
|
break;
|
84
|
84
|
}
|
|
@@ -94,13 +94,13 @@ public class ReportAdapter extends BaseQuickAdapter<ReportJson, ReportViewHolder
|
94
|
94
|
item.setOutmoney((long) Float.parseFloat(typeDataJson.getAccount()));
|
95
|
95
|
float f = item.getOutmoney() / item.getAllMoney();
|
96
|
96
|
data = JavaFormatUtils.getData(f * 100);
|
97
|
|
- helper.money_text.setText(typeDataJson.getAccount() + "");
|
|
97
|
+ helper.money_text.setText(changeFloatData(Double.parseDouble(typeDataJson.getAccount())) + "");
|
98
|
98
|
helper.progressBar.setProgress((int) (item.getOutmoney() * 100 / item.getAllMoney()));
|
99
|
99
|
break;
|
100
|
100
|
case 1:
|
101
|
101
|
item.setInmoney((long)Float.parseFloat(typeDataJson.getAccount()));
|
102
|
102
|
data = JavaFormatUtils.getData(item.getInmoney() / item.getAllMoney() * 100);
|
103
|
|
- helper.money_text.setText(typeDataJson.getAccount()+ "");
|
|
103
|
+ helper.money_text.setText(changeFloatData(Double.parseDouble(typeDataJson.getAccount()))+ "");
|
104
|
104
|
helper.progressBar.setProgress((int) (item.getInmoney() * 100 / item.getAllMoney()));
|
105
|
105
|
break;
|
106
|
106
|
}
|
|
@@ -122,4 +122,10 @@ public class ReportAdapter extends BaseQuickAdapter<ReportJson, ReportViewHolder
|
122
|
122
|
helper.line_View.setVisibility(View.VISIBLE);
|
123
|
123
|
}
|
124
|
124
|
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+ private String changeFloatData(double account){
|
|
128
|
+ java.text.DecimalFormat df = new java.text.DecimalFormat("########.00");
|
|
129
|
+ return df.format(account);
|
|
130
|
+ }
|
125
|
131
|
}
|