Remove line break in TabLayout

后端 未结 8 2035
自闭症患者
自闭症患者 2020-11-27 05:30

I just added the new TabLayout component to my app. As you may know there are two different modes for tabs app:tabMode=\"scrollable\" and app:tabMode=\"fi

8条回答
  •  爱一瞬间的悲伤
    2020-11-27 06:01

    Here's a quick hack, a lot shorter than using setCustomView(): use the android:theme attribute on your TabLayout:

    
    

    Then in your themes XML:

    
    

    We have to do it this way, because unfortunately the android:singleLine attribute is ignored on the app:tabTextAppearance set on the TabLayout. app:tabTextAppearance is really only useful for changing text size.

提交回复
热议问题