Android Action Bar Tab with scrollview made duplicate view after orientation change

前端 未结 5 1843
执笔经年
执笔经年 2021-01-04 10:52

I have a very simple code where I use Action Bar with tab fragments. It works fine after load, but after orientation change it goes crazy. The old fragment also visible (why

5条回答
  •  失恋的感觉
    2021-01-04 11:12

    Try using ft.replace(R.id.content, mFragment) in place of ft.attach(mFragment); in onTabSelected function

提交回复
热议问题