# AutoAdaptTabBar
**Repository Path**: stanhe/AutoAdaptTabBar
## Basic Information
- **Project Name**: AutoAdaptTabBar
- **Description**: No description available
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-03-12
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
## AutoAdaptTabBar
For auto adapt tabBar with deffrent tab size.
### Effect

### Usage
used as tabBar,you just need provide a title list.
#### Xml
```xml
```
#### Java
```java
AutoAdaptTabBar titleBar = (AutoAdaptTabBar) findViewById(R.id.titleBar);
List title = new ArrayList(){{add("tab0");add("news1");add("hello2");add("kety");add("god");add("killing");}};
AutoAdaptTabBar.Style style = new AutoAdaptTabBar.Style();
style.set......
titleBar.setStyle(style);
titleBar.setShowGapView(false);
titleBar.setScrollDirection(AutoAdaptTabBar.SCROLL_DIRECTION_L);
titleBar.initTabs(title,"no data"); // do after settings done.
titleBar.setTabClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(MainActivity.this, "current id: "+(int)v.getTag(), Toast.LENGTH_SHORT).show();
}
});
```
### Add dependency
1. Add it in your root build.gradle at the end of repositories:
```java
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
```
2. Add the dependency
```java
dependencies {
compile 'com.github.stanhe:AutoAdaptTabBar:1.1.0'
}
```
### Update log
v 1.1.0:
Fix setItemClick no scroll when init view.
v 1.0.8:
Cancel Over Scroll Mode to reduce detection time when fling .