0

I am stuck with a problem where I have designed a tab layout that I have used as a library in the current project which has a Recycler View. I want to show the tab layout on top and the recycler view under the tab layout. For reference in Whatsapp, there is tab layout under which there is a recycler view that shows all the messages. Problem is that I am confused about how to combine both activities together so the user can use the tab layout. If anyone knows any solution please help!!

1 Answers1

1

Use single-activity pattern. This pattern means that you need to use Fragments in a single activity (MainActivity, etc). Additional tip, you can use ViewPager2 with TabLayout for your Fragments.

Activities can't be composed into one, cause it designed so.

Exc_U
  • 11
  • 3