Closed burnix closed 8 years ago
Hi, @burnix
FragmentManager fragManager = myContext.getSupportFragmentManager();
Please try using the Fragment#getChildFragmentManager
http://developer.android.com/intl/ja/reference/android/support/v4/app/Fragment.html#getChildFragmentManager()
If you want to use the ViewPager within Fragment, you will need to use this class.
I tried to use getChildFragmentActivity, but still can't implement SlidingTabs using v.4 library
and using v.13
Please, tell what Do I do wrong?
Also, while importing v13, there're no FragmentPageAdapter and FragmentStatePagerAdapter Classes
Hi, @burnix
Utility has two types available to suit the Android support library.
・utils-v4 library contains the PagerAdapter implementation class for android.support.v4.app.Fragment ・utils-v13 library contains the PagerAdapter implementation class for android.app.Fragment
The two libraries have different Android support libraries that depend, but implemented functionality is the same.
So, if you want to use the android.support.v4.app.Fragment
,
please use the compile 'com.ogaclejapan.smarttablayout:utils-v4:x.x.x@aar'
I actually do it, but it still doesn't solve my problem - I can't use getChildFragmentManager(look the 2nd screen of previous answer)
Hi, @burnix
Why are you inherit the android.app.Fragment
?
If you want to use the v4, you need to inherit from android.support.v4.app.Fragment
.
i inherit from android.app.Fragment and i cant inherit from android.support.v4.app.Fragment what is the solution ?
I have a navigation drawer, that has few items(that replace previous fragment). My MainActivity creates a fragment that has Sliding Tabs at start. I implement them this way:
So after start in works super, but after working with items of Navigation Drawer, SlidingTabBar shows nothing, swipes becomes "flowing"...
I suppose, that my problem appears because of using v4, instead of v13. So I wanna ask you to share a piece of code, where you implement SlidingTabBar in fragment (author gives example of v.4).