android - How to use the string from editText as display textview in another activity? -
i want use string typed in edittext
textview
in new activity.
sub6 = (edittext)findviewbyid(r.id.edittext16); txt6 = (textview)findviewbyid(r.id.textview25); subject = (string) sub6.gettext().tostring(); txt6.settext(getresources().getstring(r.id.edittext16));
i have used code. of no use. can please me?
you can send string using bundle
intent i=new intent(a.this, b.class); bundle b = new bundle(); b.putstring("name", sub6.gettext().tostring()); i.putextras(b); startactivity(i);
and in receiving activity:
bundle extras = getintent().getextras(); string text = extras.getstring("name");
Comments
Post a Comment