Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iwgang/scaletablayout
Android scale tab layout
https://github.com/iwgang/scaletablayout
Last synced: 3 months ago
JSON representation
Android scale tab layout
- Host: GitHub
- URL: https://github.com/iwgang/scaletablayout
- Owner: iwgang
- License: mit
- Created: 2018-09-07T19:06:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T10:58:56.000Z (almost 6 years ago)
- Last Synced: 2023-07-26T21:58:27.667Z (over 1 year ago)
- Language: Kotlin
- Size: 382 KB
- Stars: 21
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: License
Awesome Lists containing this project
README
[![Android Arsenal]( https://img.shields.io/badge/Android%20Arsenal-ScaleTabLayout-green.svg?style=flat )]( https://android-arsenal.com/details/1/7118 ) [![@iwgang](https://img.shields.io/badge/weibo-%40iwgang-blue.svg)](http://weibo.com/iwgang)
### screenshot
![](https://raw.githubusercontent.com/iwgang/ScaleTabLayout/master/screenshot/s.gif)### gradle
implementation 'com.github.iwgang:scaletablayout:1.2'### use
```
scaleTabLayout.setViewPager(viewPager)scaleTabLayout.addTab(index: Int, tag: String, isSelect: Boolean)
scaleTabLayout.removeTab(index: Int)
scaleTabLayout.getTabTextView(index: Int): TextView
scaleTabLayout.setCurrentItem(index: Int)
scaleTabLayout.setOnTabClickListener(listener: OnTabClickListener)
```
### attributes
| attr | type | default |
|--- | --- | ---|
|stl_unSelTextSize | reference | 16sp |
|stl_selTextSize | reference | 20sp |
|stl_unSelTextColor | color | gray |
|stl_selTextColor | color | black |
|stl_tabSpacing | dimension | 20dp |
|stl_leftMargin | dimension | 15dp |
|stl_rightMargin | dimension | 15dp |
|stl_isSelTextBold | boolean | true |