Android Tab Layout not taking up full width with custom view

前端 未结 8 2473
谎友^
谎友^ 2021-02-15 17:03

Android TabLayout tabPaddingTop and tabPaddingBottom not being removed

Please refer to the above issue as well.

Even since i updated my design library to \"23.2.

8条回答
  •  春和景丽
    2021-02-15 17:39

    I was stuck for hours until I found the method tab.setCustomView(idRes). Changing from inflated to this worked for me. Alernatively, if you are inflating you can use TabLayout.TabView as root viewgroup.

    Apart from this, I am not sure if it is helpful but I used minWidth to the custom view layout.

    This is what I wanted

提交回复
热议问题