Currently I'm using android:view_state
constant to retrieve SparseArray
with views states.
It is reccomended way to do this or I should put my separate values to Bundle
(eg. position of ViewPager
)?
Currently I'm using android:view_state
constant to retrieve SparseArray
with views states.
It is reccomended way to do this or I should put my separate values to Bundle
(eg. position of ViewPager
)?
Copyright © 2021 Jogjafile Inc.
Why do you want to use
VIEW_STATE_TAG
: "android:view_state"? Check below article. It explains how you should save a state of your own view. https://trickyandroid.com/saving-android-view-state-correctly/You can extend ViewPager and override
onSaveInstanceState
andonRestoreInstanceState
to achieve that.