# tab
**Repository Path**: shenjiabing/tab
## Basic Information
- **Project Name**: tab
- **Description**: 仿爱奇艺选中凸起的tabbar
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 3
- **Forks**: 3
- **Created**: 2022-04-13
- **Last Updated**: 2024-05-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## ATab----仿爱奇艺tabbar
仿爱奇艺选中凸起的tabbar
## 参考
[参考](https://github.com/csfwff/ATab)
[介绍](https://sszsj.top/articles/2020/03/09/1583725597624.html#b3_solo_h2_0)
## 效果图
[点这里看](https://sszsj.top/articles/2020/03/09/1583725597624.html)
[或者video](https://github.com/csfwff/ATab/blob/master/screenshot/SVID_20200309_094758_1.mp4?raw=true)
## 使用方法
1. 引入
现在还么的上传,自己下载引入吧,略🤪
2. 使用
a. xml中使用
```
```
b. Java中使用
xml
```
```
java
` aTab = (ATab)findViewById(R.id.atab);`
```
aTab.addItem(new ATabItem.Builder(this).title("首页").uncheckIcon(getDrawable(R.mipmap.home_un))
.checkIcon(getDrawable(R.mipmap.home)).checkColor(R.color.colorPrimary).create());
aTab.addItem(new ATabItem.Builder(this).title("热门").uncheckIcon(getDrawable(R.mipmap.hot_un))
.checkIcon(getDrawable(R.mipmap.hot)).checkColor(R.color.colorPrimary).create());
aTab.addItem(new ATabItem.Builder(this).title("会员").uncheckIcon(getDrawable(R.mipmap.vip_un))
.checkIcon(getDrawable(R.mipmap.vip)).checkColor(R.color.colorAccent).create());
aTab.addItem(new ATabItem.Builder(this).title("消息").uncheckIcon(getDrawable(R.mipmap.msg_un))
.checkIcon(getDrawable(R.mipmap.msg)).checkColor(R.color.colorPrimary).msg("哦豁").create());
aTab.addItem(new ATabItem.Builder(this).title("我的").uncheckIcon(getDrawable(R.mipmap.mine_un))
.checkIcon(getDrawable(R.mipmap.mine)).checkColor(R.color.colorPrimary).create());
```
3. 设置监听
```
aTab.setOnItemSelectListener(new ATab.OnItemSelectListener() {
@Override
public void onItemSelect(int nowPos, int prePos) {
Log.e("-----", nowPos+"---"+prePos);
}
});
```
## ATabItem属性
定义了如下属性
```
```
部分含糊的属性看如下说明

## ATab方法说明
1. 设置选中,举例:
` aTab.setSelect(2);`
2. 设置消息
` aTab.setMsg(3,"消息内容");`
注:消息内容为null即表示不显示消息