/**
* 监听总金额变化
*/
private void listenAllFee() {
double allPay = 0.00;
for (int u = 0; u < dataList.size(); u++) {
Boolean checked = mAdapter.getIsSelected().get(u);
NeedPayBillsBean billsBean = dataList.get(u);
String fee = billsBean.getFee();
double allFee = Double.parseDouble(fee);
if(checked){
allPay+=allFee;
}
}
//把double类型累加结果--保持2位小数点
DecimalFormat df = new DecimalFormat("#####0.00");
String str = df.format(allPay);
KLog.e(str);
//总金额显示
mAllPay.setText(str);
}
**//把double类型累加结果--保持2位小数点
**
DecimalFormat df = new DecimalFormat("#####0.00");
String str = df.format(allPay);