android - My app resets my integers when switching from horizontal to vertical -


this question has answer here:

so first app on android , it's working great. however, when tilt screen horizontal view integers reset zero. if start horizontally switch vertical, resets integers 0 too. how can not reset , switch?

override onsaveinstancestate(bundle outstate) method. put data in outstate bundle, , then, in oncreate(bundle savedinstancestate), extract savedinstancestate.

if data more complex trivial integer, , not implement parcelable interface, use fragment.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -