What is the best way to round the price to 2 decimal places in the same in command. example: 7.254545 to 7.25 In case that the data appear as string ?
ArrayList<HashMap<String, String>> productsHashMapList;
holder._price.setText(productsHashMapList.get(position).get("price"));
Using split ? so split after 2 numbers after ( . ) ?
Using ( .format("%.2f", d) ) .
Using xml TextView ( IF POSSIBLE ) ?
why? and please give me some info because the second way not work and this message appear : java.util.IllegalFormatConversionException: f != java.lang.String