developer.android.com › reference › comTabLayout | Android Developers May 11, 2022 · TabLayout provides a horizontal layout to display tabs. Population of the tabs to display is done through TabLayout.Tab instances. You create tabs via newTab().From there you can change the tab's label or icon via TabLayout.Tab.setText(int) and TabLayout.Tab.setIcon(int) respectively.