I am developing an android application. I need to use a tablayout on a section of the application. But I'm unable to align the selected tab to the center of the tablayout. Can anyone help me please ?
Asked
Active
Viewed 1,536 times
0
-
Can you provide with images on what you need, and what you have achieved till now. – Ismail Iqbal Feb 01 '18 at 18:30
1 Answers
0
Gravity used to lay out the tabs in the center of the TabLayout.
TabLayout_tabGravity = "GRAVITY_CENTER"
Or
tabLayout.setTabGravity(TabLayout.GRAVITY_CENTER);

Haroon
- 538
- 2
- 11