Problems with FragmentPagerAdapter

后端 未结 1 936
旧巷少年郎
旧巷少年郎 2021-02-08 16:34

I\'m trying to make a slidescreen with viewpager and fragments so that I can load different layouts per fragment and give each page different functionality.

I followed a

1条回答
  •  感情败类
    2021-02-08 16:43

    You are using the wrong FragmentManager import. Use android.support.v4.app.FragmentManager instead.

    Same problem with Fragment - use android.support.v4.app.Fragment

    Note: if you are building an API11+ only application and want to use the native Fragments, then you should instead change your FragmentPagerAdapter import to android.support.v13.app.FragmentPagerAdapter.

    0 讨论(0)
提交回复
热议问题