android - how to set the number format for an EditText -


I want to display the number displayed in a leading zero with 1 decimal place in my edit text. 25.0 Not like 025.0

How can I do this?

It is in Android

You can use < Pre> decimal format format = new decimal font ("## #."); String formatted text = format. Format (025.0); EditText.setText (formattedText);

You will get results in EditText as 25.0

Comments