android - button settext to next class -
i have 2 classes; first.class
, second.class
. on first.class
there button , on second.class
there no button. need when button first.class
clicked there text appear on second.class
option save it.
first.class
button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { } });
public class first{ button.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { second.settext(text); } }); }
public class second{ private static string textfromfirst; public static void settext(string text){ second.textfromfirst = text; } }
Comments
Post a Comment