Android: FragmentActivity in FragmentActivity (Scrollview in Navigationbar)

无人久伴 提交于 2019-12-07 18:13:33
Abhinav Saxena

Swipe Gesture applied at Fragment level along with ViewPager with it's default swipe disabled

You can write your own touch interceptor for the fragments inside your view-pager.

However on a second opinion, please see my moqup in the question:

You can have several ViewGroup container preferably FrameLayout, where on each you can add or remove fragments using transactions. The container of the Navigation Panel is different than where the ViewPager is showing:

Keep this ViewPager in a separate fragment that spawns in yet another FrameLayout. in ViewPager here you should not use the FragmentPageAdapter, but a regular PagerAdapter (avoid nesting of fragments). Hence the ViewPager is a parent container for the Views, and not Fragments where they are shown.

The target of the navigation drawer (on item click) will be this second FrameLayout. Keep it simple!!

Similarly you can have a ViewPager inside a first tab of Tab based ViewPager with this new found information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!