Demo

各种tablayout

各种tablayout

各种tablayout

 

 compile 'com.android.support:support-v4:23.1.1'
    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:[email protected]'

 

属性

名称 格式 描述
tl_indicator_color 颜色 设置指示灯颜色
tl_indicator_height 尺寸 设置指示器高度
tl_indicator_width 尺寸 设置指标宽度
tl_indicator_margin_left 尺寸 设置指标边距,当指标宽度大于0时无效。
tl_indicator_margin_top 尺寸 设置指标边距,当指标宽度大于0时无效。
tl_indicator_margin_right 尺寸 设置指标边距,当指标宽度大于0时无效。
tl_indicator_margin_bottom 尺寸 设置指标边距,当指标宽度大于0时无效。
tl_indicator_corner_radius 尺寸 设置指示器角半径
tl_indicator_gravity 枚举 设置指标重力TOP或BOTTOM。
tl_indicator_style 枚举 设置指示器样式NORMAL或TRIANGLE或BLOCK
tl_underline_color 颜色 设置下划线颜色
tl_underline_height 尺寸 设置下划线高度
tl_underline_gravity 枚举 设置下划线重力TOP或BOTTOM
tl_divider_color 颜色 设置分隔线颜色
tl_divider_width 尺寸 设置分隔宽度
tl_divider_padding 尺寸 设置divider paddingTop和paddingBottom
tl_tab_padding 尺寸 设置选项卡paddingLeft和paddingRight
tl_tab_space_equal 布尔 设置标签空间相等
tl_tab_width 尺寸 设置标签宽度
tl_textsize 尺寸 设置文字大小
tl_textSelectColor 颜色 设置文本选择颜色
tl_textUnselectColor 颜色 设置文本取消选择颜色
tl_textBold 布尔 设置文字是粗体
tl_iconWidth 尺寸 设置图标宽度(仅适用于CommonTabLayout)
tl_iconHeight 尺寸 设置图标高度(仅适用于CommonTabLayout)
tl_iconVisible 布尔 设置图标可见(仅适用于CommonTabLayout)
tl_iconGravity 枚举 设置图标重力LEFT或TOP或RIGHT或BOTTOM(仅适用于CommonTabLayout)
tl_iconMargin 尺寸 用文本设置图标边距(仅适用于CommonTabLayout)
tl_indicator_anim_enable 布尔 设置指标支持动画(仅适用于CommonTabLayout)
tl_indicator_anim_duration 整数 设置指标动画持续时间(仅适用于CommonTabLayout)
tl_indicator_bounce_enable 布尔 设置指标aniamtion与弹跳效果(仅适用于CommonTabLayout)
tl_indicator_width_equal_title 布尔 设置指标宽度与文本相同(仅适用于SlidingTabLayout)

 下载Demo:https://github.com/H07000223/FlycoTabLayout

相关文章: