Updated ReadMe.md

This commit is contained in:
Adrian Kuta 2020-03-11 18:28:47 +01:00
parent 4f72ab42a1
commit f198d065b8

View File

@ -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`.