I have a TabLayout and a ViewPager in my app. I have around 10 tabs and for each tab one fragment.java file. Some of the fragments are pretty much the same (Just a simple Li