Separate Back Stack for each tab in Android using Fragments

后端 未结 12 1013
南旧
南旧 2020-11-22 14:51

I\'m trying to implement tabs for navigation in an Android app. Since TabActivity and ActivityGroup are deprecated I would like to implement it using Fragments instead.

12条回答
  •  遥遥无期
    2020-11-22 15:10

    I had exactly the same problem and implemented an open source github project that covers stacked tab, back and up navigation and is well tested and documented:

    https://github.com/SebastianBaltesObjectCode/PersistentFragmentTabs

    This is a simple and small framework for navigation tabs and fragment switching and handling of up and back navigation. Each tab has its own stack of fragments. It uses ActionBarSherlock and is compatible back to API level 8.

提交回复
热议问题