java - Restore Fragments State from back stack manually -


i have 4 fragments. when replace them, i've declared addtobackstack(null). when switch firstfragment fourthfragment (or third, second - doesn't matter) , press button, fine. view's exist.

but when change fragment fourthfragment fistfragment progromatically (with of bottom tabs), state isn't restored , views build again. i've tried use onsaveinstancestate(), never being called when change fragements. i've understood, onsaveinstancestate() called when activity destroyed. in case, suppose, fragments not destroyed. still need restore fragment state immediately.

how can store state of fragments, when being changed between each other?


Comments

Popular posts from this blog

json - Zend error Connection -

javascript - Trigger mouseenter when an animated element touches mouse -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -