I am new to Android development. Also new to Java (although have ample work experience in C++/Windows)
After reading some documents and going through some links and SO answers, my understanding is:
- Fragments has contents (like lists, buttons, text, images etc).
- View pager adapter has fragments added.
- View pager adapter is set to view pager.
- TabLayout set up with ViewPager.
Thus each tab would show fragments added one by one.
Is my understanding correct?
But then question is:
Are we suppose to use these components in a particular way like: provide fragments (having contents like images, texts, lists etc) to ViewPager Adapter, And set the adapter up with tabs, And finally use view pager to set up the adapter.
Is that all fixed way of assembling/using these components or is there any more to it?
I didn't find any document with diagrams and examples describing it all in one place. Would be great if someone can share. Thanks!