Android Support Design TabLayout: Gravity Center and Mode Scrollable

前端 未结 13 2038

I am trying to use the new Design TabLayout in my project. I want the layout to adapt to every screen size and orientation, but it can be seen correctly in one orientation.<

13条回答
  •  北荒
    北荒 (楼主)
    2020-12-02 07:18

    All you need is to add the following to your TabLayout

    custom:tabGravity="fill"
    

    So then you'll have:

    xmlns:custom="http://schemas.android.com/apk/res-auto"
    
    

提交回复
热议问题