I have searched a bit around for a pager for fragment , I develop on ICS API.
I know about ViewPager and all the support libs for earlier version but i don't get why I should use a support library consider the fact that I use the lastest version of the api and don't plan to support earlier version.
Do I have to write the "ViewPager" myself or is there something i didn't see in the api.
No.
The Android Support package is not only for backports of newer APIs. It is also for other classes that, for whatever reason, are not being added to the SDK, such as
ViewPager
and its supporting classes.You are welcome to write your own implementation of a view paging component. Savvy programmers would use the one in the Android Support package, since it is already written and (mostly) debugged.
UPDATE: Note that
ViewPager
works just fine with pages that are:Views
For the first case, you need the
v13
version of the support JAR, which containsv13
versions of theFragmentPagerAdapter
andFragmentStatePagerAdapter
classes.