Fragment on Screen Rotation

前端 未结 2 863
礼貌的吻别
礼貌的吻别 2021-01-12 05:01

I have added a viewpager to an activity which contains two page.

In onCreate of activity I add fragments to a fragmentAdapter:

public void onCreate(B         


        
2条回答
  •  难免孤独
    2021-01-12 05:31

    If you don't want to reload your fragment on orientation change, write following for the activity in which you are loading the fragment in manifest file.

    
     
    

提交回复
热议问题