How to set a ViewPager inside a Fragment

后端 未结 6 1331
深忆病人
深忆病人 2020-11-27 12:52

I need to place a ViewPager inside of a fragment, but I have two fragments, Fragment 1 is my MENU, and Fragment 2 I want to use as a ViewPagerIndicator.

But a fragm

6条回答
  •  余生分开走
    2020-11-27 13:30

    After Read some examples, you cant have a FragmentActivity inside a fragmentActivity. Is not necesary to have two fragments and this need be a FragmentPageAdapter... i only need to do this.

    
    
    
    
    
    
    
    
    
    

    Source: http://www.truiton.com/2013/05/android-fragmentpageradapter-example/

提交回复
热议问题