Search code examples
androidsdkhere-api

Why MapFragment(HERE-API) extends android.app.Fragment instead of android.support.v4.app.Fragment?


Why MapFragment(HERE-API) extends android.app.Fragment instead of android.support.v4.app.Fragment?

If you have a structure to maintain compatibility with oldest versions of Android you will need to change!

For example: if you have a FragmentPagerAdapter you can't use MapFragment!! Because FragmentPagerAdapter uses support.v4!


Solution

  • You should use the FragmentPagerAdapter from the v13 support library:

    android.support.v13.app.FragmentPagerAdapter

    dependencies {
        compile 'com.android.support:support-v13:+'
    }