i have a BufferedReader buf = new BufferedReader(new FileReader(file));
the result of buf
i want to set in the EditText.
I do it that way:
DecimalFormat REAL_FORMATTER = new DecimalFormat("0.##");
et202.setText(buf.readLine());
et203.setText(String.valueOf(REAL_FORMATTER.format(buf.readLine())));
et204.setText(buf.readLine());
It seems, that this isn't the right way, cause my app crashs.
But when I set the
et203.setText(String.valueOf(REAL_FORMATTER.format(buf.readLine())));
to
et203.setText(buf.readLine());
my app works fine. Is there a way to set a format from the BuefferedReader?
I just want that the EditText has this format: "0.00" -> show always 2 decimals like on the pic