Use string from MainActivity.java in activity_main.xml
I have a string defined in MainActivity.java:
public String counter1 = String.valueOf(e.getCount());
I would like to use this string in activity_main.xml as:
android:text="@string/counter1"
As you can tell I am very new to this so basic steps would be appreciated.
Thanks
No comments:
Post a Comment