Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 21st, 2018 66 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. # Android状态保存与恢复
  2.  
  3. ## Activity
  4.  
  5. + 状态保存
  6.  
  7.   - `onSaveInstanceState(Bundle)`
  8.   - `onSaveInstanceState(Bundle, PersistableBundle)`
  9.  
  10. + 状态恢复
  11.  
  12.   - `onCreate(Bundle)`
  13.   - `onCreate(Bundle, PersistableBundle)`
  14.   - `onRestoreInstanceState(Bundle)`
  15.   - `onRestoreInstanceState(Bundle, PersistableBundle)`
  16.  
  17. ## Fragment
  18.  
  19. + 状态保存
  20.  
  21.   - `onSaveInstanceState(Bundle)`
  22.  
  23. + 状态恢复
  24.  
  25.   - `onCreate(Bundle)`
  26.   - `onCreateView(LayoutInflater, ViewGroup, Bundle)`
  27.   - `onActivityCreated(Bundle)`
  28.   - `onViewStateRestored(Bundle)`
  29.  
  30. ## View/ViewGroup
  31.  
  32. + 状态保存
  33.  
  34.   - `onSaveInstanceState()`
  35.   - `saveHierarchyState(SparseArray<Parcelable>)`
  36.   - `dispatchSaveInstanceState(SparseArray<Parcelable>)`
  37.  
  38. + 状态恢复
  39.  
  40.   - `onRestoreInstanceState(Parcelable)`
  41.   - `restoreHierarchyState(SparseArray<Parcelable>)`
  42.   - `dispatchRestoreInstanceState(SparseArray<Parcelable>)`
  43.  
  44. ## Dialog
  45.  
  46. + 状态保存
  47.  
  48.   - `onSaveInstanceState(Bundle)`
  49.  
  50. + 状态恢复
  51.  
  52.   - `onRestoreInstanceState(Bundle)`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top