Fragment view in ViewPager is not restored when resuming

前端 未结 6 1431
独厮守ぢ
独厮守ぢ 2020-11-30 12:23

I have ActionBar Tabs setup. It consists of 4 tabs. Everything is fine until I navigate away from TabbedFragment and returning back.

I create tabs like

6条回答
  •  无人及你
    2020-11-30 13:03

    I guess this happens because while loading fragment android loads current and current+1, if you debug you would not see onPause getting called for the immediate next fragment.

    You can reload content programmatically in onTabChanged() method of TabHost.OnTabChangeListener.

提交回复
热议问题