开发者

Android Fragments (or something) for mobile

Is there someting to use Fragments on a mobile device? Like the Android Market or Youtube (in de watch-v开发者_运维技巧iew).


You may use the Android "Compatibility Package" that allows you to use some Android 3.0+ APIs (including Fragments) and other cool stuff on Android 1.6+ (API rev. 4).

http://developer.android.com/sdk/compatibility-library.html

To reproduce the "swipe" effect (horizontally scrolling sets of views) of the new Android market, use ViewPager (which is a part of the compatibility package).

A recent post on the Android dev blog gave details on how to use that: http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html

To have a page header similar to the Android market, you can also use this light library: https://github.com/JakeWharton/Android-ViewPagerIndicator

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜