Tag: android input filter

在EditText上使用TextWatcher在android中实时计算总数和总和?

在这里,我想将来自我的数据库和setText的默认值设为该值,并计算净费率和总数,否则,如果用户编辑费率或收费,我想根据该值计算净费率和总额。即时的。 这是我计算和显示值的代码。 private void showItem(String json) { String itembarcode = “”; String itemdesc = “”; String weight = “”; String rate = “”; String making = “”; double wt = 0.0d; double rt = 0.0d; double mk = 0.0d; try { JSONObject jsonObject = new JSONObject(json); JSONArray result = jsonObject.getJSONArray(ParseBarcode.JSON_ARRAY); JSONObject itemData = result.getJSONObject(0); itembarcode […]