All Projects → qstumn → Verticaltablayout

qstumn / Verticaltablayout

Licence: apache-2.0
垂直纵向的TabLayout、轻松创建纵向导航

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Verticaltablayout

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 (-92.37%)
Mutual labels:  tablayout
Changetablayout
[停止维护]一款炫酷的TabLayout
Stars: ✭ 345 (-68.29%)
Mutual labels:  tablayout
Materialdesignsamples
Material Design 系列控件samples,讲了Material Design 系列新控件的使用方法和一些场景示例,使用详情请看对应博客,持续更新中...
Stars: ✭ 900 (-17.28%)
Mutual labels:  tablayout
tablayout-ext
⭐🎉google 原生 Tablayout( com.google.android.material.tabs.TabLayout) 零入侵拓展,帮你更便捷的使用原生TabLayout实现一些UI效果
Stars: ✭ 69 (-93.66%)
Mutual labels:  tablayout
Xamarin Forms Tab Badge
Xamarin Forms bindable Tab badges for iOS, Android, UWP, MacOS and WPF
Stars: ✭ 304 (-72.06%)
Mutual labels:  tablayout
Dsltablayout
♥️ Android界最万能的TabLayout(不仅仅是TabLayout), 支持任意类型的item, 支持Drawable类型的指示器,智能开启滚动,支持横竖向布局等
Stars: ✭ 489 (-55.06%)
Mutual labels:  tablayout
multilayout
一个可以支持自动将分类标签拆分多行Tab标签的Layout
Stars: ✭ 14 (-98.71%)
Mutual labels:  tablayout
Viewpagerhelper
这个一个 viewpager/viewpager2工具类,能够帮你快速实现导航栏轮播图,app引导页,viewpager/viewpager2 + fragment;内置多种tab指示器,让你告别 viewpager 的繁琐操作,专注逻辑功能
Stars: ✭ 957 (-12.04%)
Mutual labels:  tablayout
Playtablayout
PlayTabLayout is a tab layout very similar to Google Play tab layout. The main feature is that ripple shows in a particular place where user taps.
Stars: ✭ 319 (-70.68%)
Mutual labels:  tablayout
Animatedtablayout
Yet another android tab layout
Stars: ✭ 572 (-47.43%)
Mutual labels:  tablayout
TabLayout
在原design包中的TabLayout的基础上增加了一些实用的属性.
Stars: ✭ 25 (-97.7%)
Mutual labels:  tablayout
Flowhelper
帮助您迅速构建顶部Tab,比如今日头条效果,热搜、搜索记录、与ViewPager/ViewPager2搭配的工具类;
Stars: ✭ 295 (-72.89%)
Mutual labels:  tablayout
Coder
Android Material Design 风格控件的学习及遇到的问题;Tablayout | 横向布局标签,TextInputLayout | 文字输入布局 ,FloatingActionButton | 悬浮按钮, CoordinatorLayout APPBarLayout CollapsingTabLayout实现折叠头布局,BottomSheetDialog | 底部对话框,Touch Feedback| 触摸反馈,Reveal Effect| 揭示效果,Curved motion | 曲线运动,Animated Vector Drawables | 矢量图片动画
Stars: ✭ 502 (-53.86%)
Mutual labels:  tablayout
BottomNavigationView
Bottom Navigation Example
Stars: ✭ 15 (-98.62%)
Mutual labels:  tablayout
Multisearchview
Yet another built-in animated search view for Android.
Stars: ✭ 837 (-23.07%)
Mutual labels:  tablayout
JSTabLayout
简书tablayout
Stars: ✭ 29 (-97.33%)
Mutual labels:  tablayout
Coordinatortablayout
Combination of TabLayout and CoordinatorLayout./TabLayout和CoordinatorLayout相结合的折叠控件
Stars: ✭ 4,114 (+278.13%)
Mutual labels:  tablayout
Legacytableview
simple light weight android library for displaying tabulated data
Stars: ✭ 39 (-96.42%)
Mutual labels:  tablayout
Funtablayout
An efficient tablayout for Android with added FUN!
Stars: ✭ 20 (-98.16%)
Mutual labels:  tablayout
Snaptablayout
Android library for fluid tablayout animation as seen on Snapchat.
Stars: ✭ 547 (-49.72%)
Mutual labels:  tablayout

VerticalTabLayout

Download

垂直竖向的Android TabLayout

一些特性

  • 支持自定义Indicator大小

  • 支持自定义Indicator位置

  • 支持Indicator设置圆角

  • 支持Tab设置Badge

  • 支持Adapter的方式创建Tab

  • 多种Tab高度设置模式

  • Tab支持android:state_selected

  • 很方便的和ViewPager结合使用

  • 很方便的和Fragment结合使用

how to use:

1. gradle

	compile 'q.rorbin:VerticalTabLayout:1.2.5'

VERSION_CODE : here

2. xml

    <q.rorbin.verticaltablayout.VerticalTabLayout
        android:id="@+id/tablayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#EDEDED"
        app:indicator_color="#FFFFFF"
        app:indicator_gravity="fill"
        app:tab_height="50dp"
        app:tab_mode="scrollable" />

3. 属性说明

xml code 说明
app:indicator_color setIndicatorColor 指示器颜色
app:indicator_width setIndicatorWidth 指示器宽度
app:indicator_gravity setIndicatorGravity 指示器位置
app:indicator_corners setIndicatorCorners 指示器圆角
app:tab_mode setTabMode Tab高度模式
app:tab_height setTabHeight Tab高度
app:tab_margin setTabMargin Tab间距

4. 创建Tab的方式

  • 普通方式创建
	tablayout.addTab(new QTabView(context))
	tablayout.addOnTabSelectedListener(new VerticalTabLayout.OnTabSelectedListener() {
            @Override
            public void onTabSelected(TabView tab, int position) {
                
            }

            @Override
            public void onTabReselected(TabView tab, int position) {

            }
        });
  • Adapter方式创建
	tablayout.setTabAdapter(new TabAdapter() {
            @Override
            public int getCount() {
                return 0;
            }

            @Override
            public TabView.TabBadge getBadge(int position) {
                return null;
            }

            @Override
            public TabView.TabIcon getIcon(int position) {
                return null;
            }

            @Override
            public TabView.TabTitle getTitle(int position) {
                return null;
            }

            @Override
            public int getBackground(int position) {
                return 0;
            }
	     });
按照自己的需要进行返回相应的值即可,不需要的返回0或者null
也可以选择使用SimpleTabAdapter,内部空实现了TabAdapter的所有方法
TabBadge、TabIcon、TabTitle使用build模式创建。
  • 结合ViewPager使用
	tablayout.setupWithViewPager(viewpager);

ViewPager的PagerAdapter可选择实现TabAdapter接口

如果您需要使用垂直竖向的ViewPager,推荐您使用:https://github.com/youngkaaa/YViewPagerDemo

  • 结合Fragment使用
	tabLayout.setupWithFragment(FragmentManager manager, int containerResid, List<Fragment> fragments, TabAdapter adapter)

5. 设置badge

	int tabPosition = 3;
	int badgeNum = 55;
	tablayout.setTabBadge(tabPosition,badgeNum);
	Badge badge = tablayout.getTabAt(position).getBadgeView();
	
	Badge使用方法请移步https://github.com/qstumn/BadgeView

6.更新计划

抽象解耦Indicator,实现绘制任意形状Indicator

LICENSE

Copyright 2016, RorbinQiu

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