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

javascript - Trigger mouseenter when an animated element touches mouse -

json - Zend error Connection -

java - Using Spring @Transactional with a combination of readOnly and write, when does this entity get committed? -