android - How to do visible EditText Data on Activity change -
hello friends having edit text in program , if writing thing on there , if clciking on other option move anothe activity , when coming same page data of edit text clearing dont want clear data if move on page can body tell me how ..i doing writing below code..
if(presetquestion.value=="true") { string note1=note.gettext().tostring(); note.settext(note1); }
but not woring thing not doing correctly ...
use onsaveinstancestate(bundle outstate)
, onrestoreinstancestate(bundle outstate)
:
@override public void onsaveinstancestate(bundle outstate) { edittext edttext=(edittext) findviewbyid(r.id.textone); outstate.putstring("textone", edttext.tostring()); } @override public void onrestoreinstancestate(bundle outstate) { string strval=outstate.getstring("textone"); edittext bddb=(edittext) findviewbyid(r.id.textone); bddb.settext("prvvalue"); ///outstate.putstring(""+idtext+"", bddb.tostring()); }
Comments
Post a Comment