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 ?
答案 0 :(得分:0)
Gravity用于布置TabLayout中心的标签。
TabLayout_tabGravity = "GRAVITY_CENTER"
或
tabLayout.setTabGravity(TabLayout.GRAVITY_CENTER);