FlycoTabLayout README

The project's README from github.com/H07000223/FlycoTabLayout. As one markdown file: README.md.

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

name format description
tl_indicator_color color set indicator color
tl_indicator_height dimension set indicator height
tl_indicator_width dimension set indicator width
tl_indicator_margin_left dimension set indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_top dimension set indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_right dimension set indicator margin,invalid when indicator width is greater than 0.
tl_indicator_margin_bottom dimension set indicator margin,invalid when indicator width is greater than 0.
tl_indicator_corner_radius dimension set indicator corner radius
tl_indicator_gravity enum set indicator gravity TOP or BOTTOM.
tl_indicator_style enum set indicator style NORMAL or TRIANGLE or BLOCK
tl_underline_color color set underline color
tl_underline_height dimension set underline height
tl_underline_gravity enum set underline gravity TOP or BOTTOM
tl_divider_color color set divider color
tl_divider_width dimension set divider width
tl_divider_padding dimension set divider paddingTop and paddingBottom
tl_tab_padding dimension set tab paddingLeft and paddingRight
tl_tab_space_equal boolean set tab space equal
tl_tab_width dimension set tab width
tl_textsize dimension set text size
tl_textSelectColor color set text select color
tl_textUnselectColor color set text unselect color
tl_textBold boolean set text is bold
tl_iconWidth dimension set icon width(only for CommonTabLayout)
tl_iconHeight dimension set icon height(only for CommonTabLayout)
tl_iconVisible boolean set icon is visible(only for CommonTabLayout)
tl_iconGravity enum set icon gravity LEFT or TOP or RIGHT or BOTTOM(only for CommonTabLayout)
tl_iconMargin dimension set icon margin with text(only for CommonTabLayout)
tl_indicator_anim_enable boolean set indicator support animation(only for CommonTabLayout)
tl_indicator_anim_duration integer set indicator animation duration(only for CommonTabLayout)
tl_indicator_bounce_enable boolean set indicator aniamtion with bounce effect(only for CommonTabLayout)
tl_indicator_width_equal_title boolean set indicator width same as text(only for SlidingTabLayout)

Dependence

Thanks

FlycoTabLayout (H07000223/FlycoTabLayout)

Searching Database…

What is this?FlycoTabLayout is an Android UI library that provides ready-made tab layout components for Android apps, available in three kinds: SlidingTabLayout, CommonTabLayout and SegmentTabLayout.
What is the difference between the three kinds of TabLayout?SlidingTabLayout is deeply modified from PagerSlidingTabStrip and depends on a ViewPager. CommonTabLayout drops the ViewPager dependence so it can be used freely with other widgets, and SegmentTabLayout is the third kind, listed without further detail.
How do I add it to my Android project?Add it as a Gradle dependency in your app module; since version 3.0.0 it is published on Maven Central, so a single dependency line pulls it in.
Does it pull in other libraries?Yes — the README lists NineOldAndroids and FlycoRoundView as dependencies you include alongside it.
Does it work with modern AndroidX projects, or only the old support libraries?Current release 3.0.0 (September 2021) was upgraded to AndroidX; it is also the newest entry in the change log, so expect a quiet release cadence.
Is it Android-only, or does it also work for iOS or the web?Android only — it is a native Android UI widget library built on Android views, so it does not apply to iOS or web apps.
Is there a demo app to see the tabs in action?Yes, the README links to a demo project showcasing the three TabLayout kinds and their attributes.
How customizable is the tab appearance?Very: dozens of XML attributes cover indicator color, height, width, gravity, corner radius and styles (NORMAL, TRIANGLE or BLOCK), plus text size, select and unselect colors, bold text, underlines, dividers and tab padding or width.
Can tabs show unread badges and icons?Yes — an unread message tip is supported on SlidingTabLayout and CommonTabLayout, and CommonTabLayout can display icons with configurable size and gravity (left, top, right or bottom relative to the text).
Creator
H07000223
Size
2.6 MB
Stars
11.1K
Age
10y
Commits · 90 Days