Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble with saving fragments state after orientation is changed
    primarykey
    data
    text
    <p>I have a trouble with saving state of current fragment after changing orientation. I've got fragments with gridview that i replace in navigation process on fragments. Actions after starting app.</p> <p>1) Starting "MainActivity".</p> <p>2) Adding "CenterPanelFragment" (this is a container for inner fragment).</p> <p>3) Replacing in "CenterPanelFragment" fragment "FragmentCatalog"(GridView). Picture 1.</p> <p>4) If i click on gridview item of "FragmentCatalog", it'll replece for fragment "FragmentCatalogStone"(Gridview). Picture 2.</p> <p>5) After that i change orientation on a device,as you can see i've got the fragment "FragmentCatalog" in Landscape orientation instead of fragment "FragmentCatalogStone" in Landscape orientation. Picture 3</p> <p>What things i do wrong? I attached necessary class files.</p> <p>Sorry for my poor english.</p> <p>Thanks a lot!</p> <p><img src="https://i.stack.imgur.com/nhXcp.png" alt="1"> <img src="https://i.stack.imgur.com/F7NMh.png" alt="2"> <img src="https://i.stack.imgur.com/iyyPA.png" alt="3"></p> <p><a href="https://dl.dropboxusercontent.com/u/35914845/MainActivity.java" rel="nofollow noreferrer">MainActivity.java</a></p> <p><a href="https://dl.dropboxusercontent.com/u/35914845/CenterPanelFragment.java" rel="nofollow noreferrer">CenterPanelFragment.java</a></p> <p><a href="https://dl.dropboxusercontent.com/u/35914845/FragmentCatalog.java" rel="nofollow noreferrer">FragmentCatalog.java</a></p> <p><a href="https://dl.dropboxusercontent.com/u/35914845/FragmentCatalogStone.java" rel="nofollow noreferrer">FragmentCatalogStone.java</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload