实现Tab配合ViewPager的滑动
Java
Latest commit a776a3d Jul 15, 2016 @youmu178 update
Permalink
Failed to load latest commit information.
TabSwitchViewLibrary update Jul 11, 2016
app add README Jul 11, 2016
gradle/wrapper init Jul 11, 2016
.gitignore init Jul 11, 2016
README.md update Jul 15, 2016
action.gif update Jul 11, 2016
build.gradle init Jul 11, 2016
gradle.properties init Jul 11, 2016
gradlew init Jul 11, 2016
gradlew.bat init Jul 11, 2016
settings.gradle update Jul 11, 2016

README.md

TabSwitchView

用简单的方法实现的Tab配合ViewPager滑动,各个区域都是已图片的方式展示

DEMO

<com.youzh.tabswitchviewlibrary.TabSwitchView
        android:id="@+id/switchTab"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="10dp"
        app:itemText="每日赚取,持有投资,到期退出"
        app:itemTextColorNormal="@color/bg_green"
        app:itemTextColorPressed="@android:color/white"/>      

Attributes

name format description
layoutBackground reference 外层背景
layoutPaddingLeft dimension 外层左边内距
layoutPaddingTop dimension 外层顶部内距
layoutPaddingRight dimension 外层右边内距
layoutPaddingBottom dimension 外层右边内距
tabBackground reference 整个Tab的背景
itemTextColorNormal reference Tab的正常字体
itemTextColorPressed reference Tab的选中字体
itemText string Tab的描述,以英文逗号分隔
itemNum integer Tab的数量
itemSelBg reference Tab滑动的图片

欢迎关注