java - How can I edit a layout's textview in a class with a different layout -
let's have class mainactivity has main_activity layout. have string in class , want set other layout's textview (secondactivity) value of string. how can that?
if want use string that's in java class, have create static string in first class.
in mainactivity:
public class mainactivity { public static string yourstring = "your string"; } then want set text of textview:
yourtextview.settext(mainactivity.yourstring);
Comments
Post a Comment