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

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -