正在加载图片...
Data Persistence in Orientation When screen rotation is changed,the activity is destroyed and opened again How to store state information Store state:-onSaveInstanceState(Bundle) Read state:-onRestoreInstancestate(Bundle) This will store data only temporarily for app lifetime! o Data will be held in memory until the app is closed! Refer to the Android Developer Site: http://developer.android.com/training/basics/activity-lifecycle/recreating.html Data Persistence in Orientation • When screen rotation is changed, the activity is destroyed and opened again • How to store state information • Store state: – onSaveInstanceState(Bundle) • Read state: – onRestoreInstanceState(Bundle) • This will store data only temporarily for app lifetime! o Data will be held in memory until the app is closed! 5 Refer to the Android Developer Site: http://developer.android.com/training/basics/activity-lifecycle/recreating.html
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有