//添加依赖包
compile 'q.rorbin:VerticalTabLayout:1.2.5'
3. 属性说明
xml | code | 说明 |
---|---|---|
app:indicator_color | setIndicatorColor | 指示器颜色 |
app:indicator_width | setIndicatorWidth | 指示器宽度 |
app:indicator_gravity | setIndicatorGravity | 指示器位置 |
app:indicator_corners | setIndicatorCorners | 指示器圆角 |
app:tab_mode | setTabMode | Tab高度模式 |
app:tab_height | setTabHeight | Tab高度 |
app:tab_margin | setTabMargin | Tab间距 |
//其他过程和Tablayout一样
//XML布局
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:orientation="h