java - Saving the state of the application -


this question has answer here:

i have application : when application starts,one row 3 edittexts created calling method called newproduct().the first of them focused , triggers creation of row of 3 edittexts.so,when last row focused,another row created dynamically. every columns inside different linear layout , gets added new arraylist<edittext>();,one of 3 columns.the values entered put inside string[],again,3 of them every column.

my questions following : 1.how can save on screen orientation changes? when change orientation,the values remain in 2 of rows because 2 rows created @ oncreate( newproduct method called,creates first row, , focused,so creates row).how can tell application create more 2 rows , keep values ?

2.how can make application keep everything,the number of rows , values , whole ui layout when user either exits app or app crashes.what want here when enters app again see state in app left last time.

thanks in advance , have nice day !

you need save bundle instance activity. check link further insight. saving bundle


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -