Android - Fragment API for API level < 11

前端 未结 4 899
名媛妹妹
名媛妹妹 2020-12-10 01:47

I have came across a problem for dynamic forms in my app, which is suited for Android 2.1 and above. I know there is new Fragment API since API level 11 (Android 3.0 Honeyco

相关标签:
4条回答
  • 2020-12-10 02:00

    Use ActionBarSherlock. It comes with a lot of working examples.

    0 讨论(0)
  • 2020-12-10 02:07

    You need to add the package to the build path.

    0 讨论(0)
  • 2020-12-10 02:11

    Here's a nice tutorial on how to implement Fragments on older Android versions, hope this will help you.

    0 讨论(0)
  • 2020-12-10 02:15

    Android Studio:

    Add a dependency for support compatibility package v4:

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

    and then use import android.support.v4.app.Fragment; instead of import android.app.Fragment; in imports.

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