Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
secf4ult committed Mar 19, 2021
1 parent 05517d0 commit d7437f1
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# VerticalTabLayout
A TabLayout component with vertical orientation in Android.
A TabLayout component with vertical orientation in Android, compatible with `ViewPager2`.

![](https://user-images.githubusercontent.com/12830176/111751022-ef0a4400-88ce-11eb-9f20-b08ff245b7de.mp4)

https://user-images.githubusercontent.com/12830176/111751022-ef0a4400-88ce-11eb-9f20-b08ff245b7de.mp4

## Usage
Add it in your root build.gradle.
Add JitPack in your root build.gradle.
```
allprojects {
repositories {
Expand All @@ -14,6 +18,14 @@ allprojects {
then add the dependency in module build.gradle with intended release tag, e.g `v0.1.0`.
```
dependencies {
implementation 'com.github.secf4ult:VerticalTabLayout:v0.1.0'
implementation 'com.github.secf4ult:VerticalTabLayout:v0.1.0'
}
```
use it like normal `VerticalTabLayout`.
```
VerticalTabLayout verticalTabLayout = findViewById(R.id.verticalTabLayout);
new VerticalTabLayoutMediator(
verticalTabLayout,
viewPager,
((tab, position) -> tab.setText(tabTitles[position]))).attach;
```

0 comments on commit d7437f1

Please sign in to comment.