mirror of
https://github.com/AdrianKuta/ViewPagerDotsIndicator.git
synced 2025-04-19 23:19:02 +02:00
Updated ReadMe.md
This commit is contained in:
parent
4f72ab42a1
commit
f198d065b8
@ -16,8 +16,7 @@ selected and default dots.
|
||||
|
||||
Firstly, we have to add `TabLayout` to our screen layout, and connect it
|
||||
with `ViewPager`. We can do this in two ways:
|
||||
|
||||
|
||||
---
|
||||
#### Nested `TabLayout` in `ViewPager`
|
||||
```xml
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
@ -33,7 +32,7 @@ with `ViewPager`. We can do this in two ways:
|
||||
|
||||
> In this case `TabLayout` will be automatically connected with
|
||||
> `ViewPager`, but `TabLayout` will be next to `ViewPager`, not over it.
|
||||
|
||||
---
|
||||
#### Separate `TabLayout`
|
||||
|
||||
```xml
|
||||
@ -67,7 +66,7 @@ TabLayoutMediator(tabLayout, viewPager2) { tab, position ->
|
||||
//Some implementation...
|
||||
}.attach()
|
||||
```
|
||||
|
||||
---
|
||||
Once we created our layout, we have to prepare our dots. So we create
|
||||
three files: `selected_dot.xml`, `default_dot.xml` and
|
||||
`tab_selector.xml`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user