FlycoTabLayout

by H07000223

H07000223 /FlycoTabLayout

An Android TabLayout Lib

10.0K Stars 2.2K Forks Last release: over 4 years ago (v2.0.2) MIT License 40 Commits 4 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

FlycoTabLayout

Android Arsenal

中文版

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

  • SlidingTabLayout: deeply modified from PagerSlidingTabStrip.

    • new added attribute
    • new added kinds of indicators
    • new added unread msg tip
    • new added method for convenience
        /** no need to set titles in adapter */
        public void setViewPager(ViewPager vp, String[] titles)
    
    
    /** no need to initialize even adapter */
    public void setViewPager(ViewPager vp, String[] titles, FragmentActivity fa, ArrayList<fragment> fragments) 

  • CommonTabLayout:unlike SlidingTabLayout's dependence on ViewPager,it is a tabLayout without dependence on ViewPager and can be used freely with other widgets together.

    • support kinds of indicators and indicator animation
    • support unread msg tip
    • support icon and icon gravity.
    • new added method for convenience
        /** support switch fragments itself */
        public void setTabData(ArrayList tabEntitys, FragmentManager fm, int containerViewId, ArrayList fragments)
    
  • SegmentTabLayout

Demo

Change Log

v2.0.0(2016-03-01) - remove the dependence of FlycoRoundView - new added method getIconView and getTitleView

v2.0.2(2016-04-23) - remove the dependence of NineOldAnimation(only support 3.0+)

Gradle

dependencies{
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.flyco.roundview:FlycoRoundView_Lib:[email protected]'
    compile 'com.flyco.tablayout:FlycoTabLayout_Lib:[email protected]'
}

After v2.0.0 dependencies{ compile 'com.android.support:support-v4:23.1.1' compile 'com.nineoldandroids:library:2.4.0' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:[email protected]' }

After v2.0.2(support 3.0+) dependencies{ compile 'com.android.support:support-v4:23.1.1' compile 'com.flyco.tablayout:FlycoTabLayout_Lib:[email protected]' }

Attributes

|name|format|description| |:---:|:---:|:---:| | tlindicatorcolor | color |set indicator color | tlindicatorheight | dimension |set indicator height | tlindicatorwidth | dimension |set indicator width | tlindicatormarginleft | dimension |set indicator margin,invalid when indicator width is greater than 0. | tlindicatormargintop | dimension |set indicator margin,invalid when indicator width is greater than 0. | tlindicatormarginright | dimension |set indicator margin,invalid when indicator width is greater than 0. | tlindicatormarginbottom | dimension |set indicator margin,invalid when indicator width is greater than 0. | tlindicatorcornerradius | dimension |set indicator corner radius | tlindicatorgravity | enum |set indicator gravity TOP or BOTTOM. | tlindicatorstyle | enum |set indicator style NORMAL or TRIANGLE or BLOCK | tlunderlinecolor | color |set underline color | tlunderlineheight | dimension |set underline height | tlunderlinegravity | enum |set underline gravity TOP or BOTTOM | tldividercolor | color |set divider color | tldividerwidth | dimension |set divider width | tldividerpadding |dimension| set divider paddingTop and paddingBottom | tltabpadding |dimension| set tab paddingLeft and paddingRight | tltabspaceequal |boolean| set tab space equal | tltabwidth |dimension| set tab width | tltextsize |dimension| set text size | tltextSelectColor |color| set text select color | tltextUnselectColor |color| set text unselect color | tltextBold |boolean| set text is bold | tliconWidth |dimension| set icon width(only for CommonTabLayout) | tliconHeight |dimension|set icon height(only for CommonTabLayout) | tliconVisible |boolean| set icon is visible(only for CommonTabLayout) | tliconGravity |enum| set icon gravity LEFT or TOP or RIGHT or BOTTOM(only for CommonTabLayout) | tliconMargin |dimension| set icon margin with text(only for CommonTabLayout) | tlindicatoranimenable |boolean| set indicator support animation(only for CommonTabLayout) | tlindicatoranimduration |integer| set indicator animation duration(only for CommonTabLayout) | tlindicatorbounceenable |boolean| set indicator aniamtion with bounce effect(only for CommonTabLayout) | tlindicatorwidthequaltitle |boolean| set indicator width same as text(only for SlidingTabLayout)

Dependence

Thanks

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.