All Projects → ATHBK → UltimateTabLayout

ATHBK / UltimateTabLayout

Licence: other
A library for tab layout use with viewpager. Very useful, small

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to UltimateTabLayout

Dsltablayout
♥️ Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等
Stars: ✭ 489 (+1381.82%)
Mutual labels:  badge, viewpager, tablayout
Android Tab Animation
Easily create TabLayout.Tab animations that sync with the scrolling progress of ViewPager
Stars: ✭ 68 (+106.06%)
Mutual labels:  viewpager, tablayout
ViewWorld
自定义View合集,展示各种自定义View/控件。项目包含了自定义Banner轮播图控件,自定义验证码输入框,自定义TabLayout等控件,持续更新中😉😉😉
Stars: ✭ 94 (+184.85%)
Mutual labels:  viewpager, tablayout
Image-Support
Add badge with counter to ImageView Android.
Stars: ✭ 128 (+287.88%)
Mutual labels:  badge, icon
Snaptablayout
Android library for fluid tablayout animation as seen on Snapchat.
Stars: ✭ 547 (+1557.58%)
Mutual labels:  viewpager, tablayout
Funtablayout
An efficient tablayout for Android with added FUN!
Stars: ✭ 20 (-39.39%)
Mutual labels:  viewpager, tablayout
Whatsappviewpager
Swipeable tabs like WhatsApp in Android
Stars: ✭ 115 (+248.48%)
Mutual labels:  viewpager, tablayout
PagerSlidingTabStrip
An interactive indicator to navigate between the different pages of a ViewPager
Stars: ✭ 2,194 (+6548.48%)
Mutual labels:  viewpager, tablayout
ScratchPaper
A Gradle Plugin for adding variant/version/git-commit-id/etc information to APK launcher icon.
Stars: ✭ 58 (+75.76%)
Mutual labels:  badge, icon
Xamarin Forms Tab Badge
Xamarin Forms bindable Tab badges for iOS, Android, UWP, MacOS and WPF
Stars: ✭ 304 (+821.21%)
Mutual labels:  badge, tablayout
Changetablayout
[停止维护]一款炫酷的TabLayout
Stars: ✭ 345 (+945.45%)
Mutual labels:  viewpager, tablayout
Ruby Gem Downloads Badge
Clean and simple gem downloads count badge, courtesy of http://shields.io/. You can checkout the application directly at the following URL:
Stars: ✭ 29 (-12.12%)
Mutual labels:  badge, icon
Flowhelper
帮助您迅速构建顶部Tab,比如今日头条效果,热搜、搜索记录、与ViewPager/ViewPager2搭配的工具类;
Stars: ✭ 295 (+793.94%)
Mutual labels:  viewpager, tablayout
Viewpagerhelper
这个一个 viewpager/viewpager2工具类,能够帮你快速实现导航栏轮播图,app引导页,viewpager/viewpager2 + fragment;内置多种tab指示器,让你告别 viewpager 的繁琐操作,专注逻辑功能
Stars: ✭ 957 (+2800%)
Mutual labels:  viewpager, tablayout
multilayout
一个可以支持自动将分类标签拆分多行Tab标签的Layout
Stars: ✭ 14 (-57.58%)
Mutual labels:  viewpager, tablayout
Magicindicator
A powerful, customizable and extensible ViewPager indicator framework. As the best alternative of ViewPagerIndicator, TabLayout and PagerSlidingTabStrip —— 强大、可定制、易扩展的 ViewPager 指示器框架。是ViewPagerIndicator、TabLayout、PagerSlidingTabStrip的最佳替代品。支持角标,更支持在非ViewPager场景下使用(使用hide()、show()切换Fragment或使用setVisibility切换FrameLayout里的View等),http://www.jianshu…
Stars: ✭ 8,969 (+27078.79%)
Mutual labels:  viewpager, tablayout
Material-BottomBarLayout
🎉A material navigation bar library which has pretty animations and different ways of arrangement.
Stars: ✭ 56 (+69.7%)
Mutual labels:  viewpager, tablayout
qpage
👨‍💻 Free Project For Creating Academic Homepage Without Any Code In 3min
Stars: ✭ 87 (+163.64%)
Mutual labels:  badge, icon
Badges4 Readme.md Profile
👩‍💻👨‍💻 Improve your README.md profile with these amazing badges.
Stars: ✭ 929 (+2715.15%)
Mutual labels:  badge, icon
Badgeforappicon
The unread badges of the android launcher icon.
Stars: ✭ 83 (+151.52%)
Mutual labels:  badge, icon

Android Arsenal

UltimateTabLayout for ViewPager (new library, very use, full option)

UltimateTabLayout is a library that allows you to create a tab of viewpager with 2 style:

  • Sling.

  • Fixed.

    demo

    demo

    demo

    demo

    demo

    demo

    demo


Table of Contents

  1. Gradle Dependency
    1. Repository
    2. Dependency
  2. Basic Usage
    1. UltimateTabLayout XML
    2. Attributes
  3. Init Java
  4. License

Gradle Dependency

Repository

Add this in your root build.gradle file (not your module build.gradle file):

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

Dependency

Add this to your module's build.gradle file:

dependencies {
	compile 'com.github.ATHBK:UltimateTabLayout:1.3.0'
}

Basic Usage

UltimateTabLayout XML

To use this UltimateTabLayout in your layout simply copy and paste the xml below. This provides the default indicator.

 <com.athbk.ultimatetablayout.UltimateTabLayout
        android:id="@+id/tabLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:tab_orientation="horizontal"
        app:tab_style="fixed"
        app:tab_position_icon="icon_left"
        app:tab_width="0dp"
        app:tab_under_line_color="@color/colorPrimaryDark"
/>

UltimateTabLayout Attr

There are several other attributes that can be used to configure color text, icon, background tab, size.

Attrrs type option
tab_style style of tab layout enum sliding or fixed
tab_text_size       size of text             float                                                
tab_text_color color of text reference
tab_under_line_show visible of under line boolean
tab_under_line_color color of under line color
tab_width width of each tab dimension
tab_height height of each tab dimension
tab_padding_top padding top in tab dimension
tab_padding_bottom padding bottom in tab dimension
tab_padding_left padding left in tab dimension
tab_padding_righ padding right in tab dimension
tab_width_icon width of icon dimension
tab_height_icon height of icon dimension
tab_position_icon posistion of icon for text enum icon_left or icon_right or icon_top or icon_bottom
tab_padding_icon padding icon for text dimension
tab_orientation orientation of each tab enum vertical or horizontal
tab_height_under_line height of under line dimension update version 1.2.3
tab_resource_font assets from resource' font string update version 1.2.4
tab_badge style's badge enum no_number or number (update version 1.3.0)
  • Tip: only use for style's fixed. If you want to auto align, you will tab_width = "0dp" with tab_orientation = "horizontal" or tab_height = "0dp" with tab_orientation = "vertical"

Init from Java

Java

How to use in .

	adapter = new FragmentAdapterDemo(getSupportFragmentManager());
        viewPager.setAdapter(adapter);
	
	//options. if you override onClickTabListener.
        tabLayout.setOnClickTabListener(new OnClickTabListener() {
            @Override
            public void onClickTab(int currentPos) {
                Log.e("LOG", "OnClickTab " + currentPos);
                    viewPager.setCurrentItem(currentPos);
            }
        });      
	// You use to this function for update count number notify with style number's badge.
	tabLayout.setNumberBadge(tabPosition, count);

	tabLayout.setViewPager(viewPager, adapter);

** Note: Adapter must implements IFTabAdapter

  • If title is empty, tab will show only icon
  • If icon is empty, tab will show only title
  • If title and icon is'nt empty, tab will show both.

License

Copyright 2017 ATHBK

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].