Home

Awesome

FlycoTabLayout

Android Arsenal

中文版

An Android TabLayout Lib has 3 kinds of TabLayout at present.

Demo

Change Log

3.0.0 (2021-09-30)

Gradle

// AndroidX
dependencies {
    implementation 'io.github.h07000223:flycoTabLayout:3.0.0'
}

// Old
dependencies{
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:2.1.2@aar'
}

Attributes

nameformatdescription
tl_indicator_colorcolorset indicator color
tl_indicator_heightdimensionset indicator height
tl_indicator_widthdimensionset indicator width
tl_indicator_margin_leftdimensionset indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_topdimensionset indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_rightdimensionset indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_bottomdimensionset indicator margin,invalid when indicator width is greater than 0.
tl_indicator_corner_radiusdimensionset indicator corner radius
tl_indicator_gravityenumset indicator gravity TOP or BOTTOM.
tl_indicator_styleenumset indicator style NORMAL or TRIANGLE or BLOCK
tl_underline_colorcolorset underline color
tl_underline_heightdimensionset underline height
tl_underline_gravityenumset underline gravity TOP or BOTTOM
tl_divider_colorcolorset divider color
tl_divider_widthdimensionset divider width
tl_divider_paddingdimensionset divider paddingTop and paddingBottom
tl_tab_paddingdimensionset tab paddingLeft and paddingRight
tl_tab_space_equalbooleanset tab space equal
tl_tab_widthdimensionset tab width
tl_textsizedimensionset text size
tl_textSelectColorcolorset text select color
tl_textUnselectColorcolorset text unselect color
tl_textBoldbooleanset text is bold
tl_iconWidthdimensionset icon width(only for CommonTabLayout)
tl_iconHeightdimensionset icon height(only for CommonTabLayout)
tl_iconVisiblebooleanset icon is visible(only for CommonTabLayout)
tl_iconGravityenumset icon gravity LEFT or TOP or RIGHT or BOTTOM(only for CommonTabLayout)
tl_iconMargindimensionset icon margin with text(only for CommonTabLayout)
tl_indicator_anim_enablebooleanset indicator support animation(only for CommonTabLayout)
tl_indicator_anim_durationintegerset indicator animation duration(only for CommonTabLayout)
tl_indicator_bounce_enablebooleanset indicator aniamtion with bounce effect(only for CommonTabLayout)
tl_indicator_width_equal_titlebooleanset indicator width same as text(only for SlidingTabLayout)

Dependence

Thanks