TabLayout not filling width when tabMode set to 'scrollable'

前端 未结 17 791
傲寒
傲寒 2020-12-02 16:58

I have added TabLayout (from support library v22.2.1) to my Fragment as:



        
17条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 17:36

    Here's an easier way to make sure that the width of tab is equal to tab's string length

    
    
        
    
    
    

    Following code is used:-

    app:tabMaxWidth="0dp"
    app:tabMode="scrollable"
    

提交回复
热议问题