First, I've upgraded to API-21 including eclipse android toolkit and SDK.
I want to use the fragment feature and still want to support those 2.x phones
I know that I must use support library - v4.
But the problem is when I create an Android project, it always shows "Navigation Type "Scrollable Tabs Swipe" requires a minimum SDK version of at least 11, and the current min version is 8".
How could I solve this tricky problem?
====================================== My settings: Minimum required SDK: API 8 Target SDK: API 17 Compile With: API 17
======================================
Thanks!!
CodePudding user response:
Eclipse's project templates make use of features that require a number of APIs (mostly ActionBar
), which are not provided by the support library. While you can use Fragments
, with the support library, you don't have the other features associated with the APIs.
You could still implement swipe/scroll tabs by yourself though. However, you will have to create them manually (and not using Eclipse's built-in project templates).
You will need to use android.support.v4.view.PagerTabStrip, android.support.v4.view.ViewPager and android.support.v4.app.Fragment. The documentation is pretty clear and should point you in the right direction.