Android: Tab Change Recycler Scroll in Kotlin
In recent days UI and UX become more enhanced and complex. UI designers try to make UI creative, interactive & user friendly for users whereas development becomes more complex for developers while achieving UI requirements.
Let’s start implementation and how to achieve UI.
First of all what is our UI ?
How to achieve this UI ?
The UI looks good although, A little complex for a developer to achieve this . So , first of all you need to break the UI & coding into parts. This is how I divided UI below :-
1. Top tab or Selectable tab in horizontal recycler view.
2. Simple vertical recycler view for product.
3. Indexing of all vertical list.
4. Scroll logic.
Lets start coding now:-
XML
1. Top tab or Selectable tab in horizontal recycler view.
2. Simple vertical recycler view for product.
3. Indexing of all vertical list.
Vertical data input
Set Index in vertical data input
Horizontal data input
4. Scroll logic.
yes ,that’s it from coding size.
If we put everything in single solution.
This is how you how activity looks like:
Activity
This is how output looks like:
Hope you liked the article :-