All Projects → JasonGaoH → Xtablayout

JasonGaoH / Xtablayout

Licence: apache-2.0
🧀Enhanced version of TabLayout, add the custom width of the TabLayout Indicator, add the animation effect of Weibo navigation bar, support the Indicator rounded effect, support the TAB to add red dots and Numbers.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Xtablayout

Pagerslidingtabstrip
一款android指示器TabLayout、PagerSlidingTabStrip,仿Boss直聘,带有红点未读提示
Stars: ✭ 152 (-42.42%)
Mutual labels:  tablayout
UltimateTabLayout
A library for tab layout use with viewpager. Very useful, small
Stars: ✭ 33 (-87.5%)
Mutual labels:  tablayout
JSTabLayout
简书tablayout
Stars: ✭ 29 (-89.02%)
Mutual labels:  tablayout
Raised Center Tab In Android
Customized tabhost having raised center tab.
Stars: ✭ 158 (-40.15%)
Mutual labels:  tablayout
Apporder
骚操作之改造TabLayout,修改指示线宽增加切Tab过渡动画
Stars: ✭ 246 (-6.82%)
Mutual labels:  tablayout
TabSync
A lightweight synchronizer between Android's Tabs and Lists. Available on the View system and Jetpack Compose.
Stars: ✭ 98 (-62.88%)
Mutual labels:  tablayout
Whatsappviewpager
Swipeable tabs like WhatsApp in Android
Stars: ✭ 115 (-56.44%)
Mutual labels:  tablayout
tablayout-ext
⭐🎉google 原生 Tablayout( com.google.android.material.tabs.TabLayout) 零入侵拓展,帮你更便捷的使用原生TabLayout实现一些UI效果
Stars: ✭ 69 (-73.86%)
Mutual labels:  tablayout
ViewWorld
自定义View合集,展示各种自定义View/控件。项目包含了自定义Banner轮播图控件,自定义验证码输入框,自定义TabLayout等控件,持续更新中😉😉😉
Stars: ✭ 94 (-64.39%)
Mutual labels:  tablayout
multilayout
一个可以支持自动将分类标签拆分多行Tab标签的Layout
Stars: ✭ 14 (-94.7%)
Mutual labels:  tablayout
Android Tablayouthelper
A small library which helps to use TabLayout with ViewPager more easily.
Stars: ✭ 181 (-31.44%)
Mutual labels:  tablayout
Jpagerslidingtabstrip
🔥A useful tablayout modify from astuetz/PagerSlidingTabStrip
Stars: ✭ 233 (-11.74%)
Mutual labels:  tablayout
PagerSlidingTabStrip
An interactive indicator to navigate between the different pages of a ViewPager
Stars: ✭ 2,194 (+731.06%)
Mutual labels:  tablayout
Android Video Listing Mvp
Android video listing with swipe view tabs based on mvp design pattern with complete functionalities like search and sort
Stars: ✭ 151 (-42.8%)
Mutual labels:  tablayout
un-material-tab
(deprecated) Custom tab layout which can be used as a material TabLayout alternative and contains basic functionality which Google's TabLayout has.
Stars: ✭ 83 (-68.56%)
Mutual labels:  tablayout
Universal Collapsingtablayout
CollapsingToolbarLayout with TabLayout
Stars: ✭ 118 (-55.3%)
Mutual labels:  tablayout
Material-BottomBarLayout
🎉A material navigation bar library which has pretty animations and different ways of arrangement.
Stars: ✭ 56 (-78.79%)
Mutual labels:  tablayout
TabLayout
在原design包中的TabLayout的基础上增加了一些实用的属性.
Stars: ✭ 25 (-90.53%)
Mutual labels:  tablayout
BottomNavigationView
Bottom Navigation Example
Stars: ✭ 15 (-94.32%)
Mutual labels:  tablayout
GlueTabLayout
能精确修改TabLayout的下划线指示器的宽度,能使用粘动动画。
Stars: ✭ 39 (-85.23%)
Mutual labels:  tablayout

XTabLayout

背景

XTabLayout主要是基于原生TabLayout的改造,最早的需求是想可以手动调整TabLayout的下划线宽度,由于项目中TabLayout和ViewPager这样的使用方式很多,所以不想改动太多现有代码,在对比了各种改动TabLayout的下划线宽度之后,发现这种基于系统TabLayout改造的XTabLayout这种实现更好,另外可定制性也更高。

比较

各种改动 优势 局限
系统TabLayout 无需代码改动 不够灵活,各种属性不能定制
基于系统TabLayout反射一 改动小 不够灵活,容易有兼容问题,TabLayout一些属性会失效,比如tabMode设置scrollable会失效
基于系统TabLayout反射二 改动小 不够灵活,容易有兼容问题,会压缩TabLayout的Tab左右padding,这样tab的可点击区域会变小
XTabLayout 灵活,定制性高 需要修改不少TabLayout的逻辑

可以看下面的截图效果比较:

GIF展示:

另外

在支持用x_tabIndicatorWidth属性来动态设置下划线高度的同时,还增加了以下新功能:

  1. 添加x_tabIndicatorAnimation来控制是否支持类似微博的导航条动效,默认false不支持
  2. 添加x_tabIndicatorRoundRect来控制Indicator下划线的圆角效果,默认false没有圆角
  3. 支持在Tab上加入红点和红点数字

详情请见博客链接:关于TabLayout的indicator宽度的一次探索

关于

博客:https://blog.csdn.net/H_Gao

邮箱:[email protected]

License

Copyright 2018 JasonGaoH

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

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].