Skip to content Skip to sidebar Skip to footer

Android, Is It Possible To Format Textview Like System.out.format("%02d", N);?

I have a table with different columns. instead of creating text view for each item i want to have one textview for each row. i want to add each item one by one to row string. becau

Solution 1:

http://developer.android.com/guide/topics/resources/string-resource.html

Formatting strings

<string name="welcome_messages">Hello, %1$s! You have %2$dnew messages.</string>

Resources res = getResources();
String text = String.format(res.getString(R.string.welcome_messages), username, mailCount);

Solution 2:

Post a Comment for "Android, Is It Possible To Format Textview Like System.out.format("%02d", N);?"