How to create Android tabs like this (screenshot)?

后端 未结 4 796
一整个雨季
一整个雨季 2021-01-03 05:42

Any idea how to implement tabs like these (the one on top with home image, star, etc)

\"Tabs

相关标签:
4条回答
  • 2021-01-03 06:00

    Those are so-called "swipey tabs", probably on top of a ViewPager. ViewPagerIndicator has an implementation of such tabs.

    0 讨论(0)
  • 2021-01-03 06:04

    Using tabs in an action bar on Ice Cream Sandwich.

    Or ActionBarSherlock tabs for a full on backward compatibility.

    0 讨论(0)
  • 2021-01-03 06:08

    if you wish to use the same tabs-pager like on the android market app (aka google play) , you can get the android support library from the sdk manager and see their sample on ".../extras/android/support/samples/Support4Demos" . there , find the fragment example called "tabs and pager" . i think you will like it ... :)

    0 讨论(0)
  • 2021-01-03 06:25

    Try this. The solution there is to use the setDividerDrawable(...) method of the TabWidget class. Then you can define the looks of the tabs with XML.

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