Saving Fragment state in ViewPager

前端 未结 6 1401
旧巷少年郎
旧巷少年郎 2020-12-04 15:25

I tried out the sample code from the API and it didn\'t really work so I implemented my own:

FragmentPagerSupport

public class Fragm         


        
6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-04 16:28

    If you override

    public void destroyItem(View container, int position, Object object)
    

    without calling super, the fragment will not be destroyed and will be reused.

提交回复
热议问题