简体   繁体   中英

How to Implement top and bottom tab bar in android

实现顶部和底部标签栏的最简单方法是什么,我进行了很多搜索。有人可以帮助我找出答案吗?

If you want to create swap-able tab bar then please use sample on below link: 1.

1. http://www.androidhive.info/2013/10/android-tab-layout-with-swipeable-views-1/ 2. http://javapapers.com/android/android-tab-layout-with-swipe-views/ 3. https://github.com/JakeWharton/ViewPagerIndicator

for bottom, use 3rd link :

<com.viewpagerindicator.TitlePageIndicator
    android:id="@+id/titles"
    android:layout_height="wrap_content"
    android:layout_width="fill_parent" />

bottom of view.

For non swap-able use sample on below link:

http://www.survivingwithandroid.com/2013/06/android-action-bar-with-tab.html http://javapapers.com/android/android-tab-layout-tutorial/ if you want to create bottom tab bar then use:

android:layout_alignParentBottom="true"

please use sample : http://envyandroid.com/align-tabhost-at-bottom/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM