仿微信底部tab标签,滑动的时候颜色渐变,使用极其简单,只需要两行代码。
欢迎大家下载体验本项目,如果使用过程中遇到什么问题,欢迎反馈。
该项目和我github上其他的view相关的项目已经一起打包上传到jCenter仓库中(源码地址 https://github.com/jeasonlzy0216/ViewCore ),使用的时候可以直接使用compile依赖,用法如下
compile 'com.lzy.widget:view-core:0.1.5'或者使用
compile project(':alphaview')该项目可以自动判断每一个Tab中的View,是否具有图标和文字,允许出现以下三种情况:
配置参数
参数含义
tabIconNormal
未选中的图标
tabIconSelected
已经选中的图标
tabText
tab标签的文字
tabTextSize
tab标签的文字大小
textColorNormal
未选中的文字颜色
textColorSelected
已选中的文字颜色 protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
viewPager.setAdapter(new MainAdapter(getSupportFragmentManager()));
AlphaIndicator alphaIndicator = (AlphaIndicator) findViewById(R.id.alphaIndicator);
alphaIndicator.setViewPager(viewPager);
}
No open issues yet, or sync has not completed.