Reputation: 2887
How would I use android.app.Fragment; inside FragmentStatePagerAdapter
It only supports returning: android.support.v4.app.Fragment. An existing fragment I am using inherits from RxFragment which doesn't use the support library fragment.
Upvotes: 0
Views: 497
Reputation: 2897
You can use android.app.Fragment
if you use android.support.v13.app.FragmentStatePagerAdapter
from the v13 Support Library. See this answer from @brillenheini
Upvotes: 0
Reputation: 67259
You can't.
FragmentStatePagerAdapter
and FragmentPagerAdapter
are part of the support library, and only support the support Fragments.
If you really want to do this, you could copy the source for those classes and replace the support Fragment imports with framework Fragment imports.
Upvotes: 3