高仿微信底部状态栏的轻量级库
来源:互联网 发布:java集合常用的方法 编辑:程序博客网 时间:2024/05/22 12:24
AlphaTabsIndicator
高仿微信底部状态栏的轻量级库
git地址 AlphaTabsIndicator
Abstract 摘要
仿微信底部tab标签,滑动的时候颜色渐变,增加角标功能, 使用极其简单,只需要两行代码。
Gif 动画
Screenshot 图片
Demo 下载APK体验
Download Demo
Usage 使用方法
Step 1
Gradle 配置
dependencies { compile 'com.yinglan.alphatabs:library:1.0.2'}
Step 2
In Layout
<com.yinglan.alphatabs.AlphaTabsIndicator android:id="@+id/alphaIndicator" android:layout_width="match_parent" android:layout_height="55dp" android:orientation="horizontal"> <com.yinglan.alphatabs.AlphaTabView android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:padding="5dp" app:tabIconNormal="" app:tabIconSelected="" app:tabText="" app:tabTextSize="" app:textColorNormal="" app:textColorSelected="" app:badgeBackgroundColor=""/> <com.yinglan.alphatabs.AlphaTabView android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="1" android:padding="5dp" app:tabIconNormal="" app:tabIconSelected="" app:tabText="" app:tabTextSize="" app:textColorNormal="" app:textColorSelected="" app:badgeBackgroundColor=""/> 、、、、 、、、、 </com.yinglan.alphatabs.AlphaTabsIndicator> //模式
功能与参数定义
In Code
AlphaTabView 方法
mAlphaTabView.showNumber(int i); //显示数子角标 mAlphaTabView.showPoint(); //显示小红点 mAlphaTabView.removeShow(); //移除角标
AlphaTabsIndicator 方法
mAlphaTabsIndicator.setViewPager(ViewPager mViewPger); //设置ViewPager mAlphaTabsIndicator.setOnTabChangedListner(OnTabChangedListner listner); //设置底部tab点击监听 mAlphaTabsIndicator.removeAllBadge(); //移除所有tab的角标
Instructions - 说明
本库是在征得jeasonlzy的许可后,在其AlphaIndicatorView基础上做的易用性改进,感谢,现持续开源。
改进项主要有:
1. 增加角标,使其更接近微信底部tab;
1. 对角标的大小进行动态控制,会更具tab高度自适应;
1. 对使用要求限制适当降低,可以在不绑定viewpager的情况下使用。
1. 增加点击tab的监听回调。
1. 增加在代码mViewPager.setCurrentItem(i)控制状态下tab联动。
点击git地址查看更多 AlphaTabsIndicator
0 0
- 高仿微信底部状态栏的轻量级库
- Microsoft Excel底部的状态栏
- 底部状态栏上飞动的文字
- android tablet开发, 如何去掉底部的状态栏
- Android 禁止下拉状态栏和底部导航栏的控制
- 隐藏Android 4.0+平板底部状态栏的方法
- Android 禁止下拉状态栏和底部导航栏的控制
- android 状态栏移动到底部
- 状态栏与底部导航栏
- 设置顶到状态栏底部
- android 获取系统顶部状态栏(Status Bar)与底部导航栏( 获取底部浮动菜单 Navigation Bar)的高度
- android5.1系统修改源码实现隐藏底部状态栏、隐藏通知栏、隐藏上方状态栏、永不熄屏的方法
- 把android 4.2平板的状态栏从底部挪到顶部 NavigationBar
- Android获取系统顶部状态栏(StatusBar)与底部工具栏(NavigationBar)的高度
- Android 获取系统顶部状态栏高度和底部导航栏的高度
- zxing 顶部状态栏与底部虚拟按键对取景范围的影响
- Android 获取系统顶部状态栏高度和底部导航栏的高度
- 沉浸式的封装(状态栏和底部导航同时实现)
- JSP基础知识
- Bootstrap switch.js 开关插件 api
- JSP中getParameter与setAttribute的区别
- [译]Oculus:"sensor fusion:Keeping It Simple"
- SD卡上挂载文件系统
- 高仿微信底部状态栏的轻量级库
- SQl笔记第三部分(PL_SQL)
- 欢迎使用CSDN-markdown编辑器
- cocos2d-c++ 添加iOS广告sdk遇到的问题(inmobile)
- 小试1解析
- 使用Alamofire进行XML参数的POST请求
- AndroidStudio使用之路
- Picasso设计详解
- android 控件 fragment baseFragment