TabLayout not filling width when tabMode set to 'scrollable'

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

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



        
17条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 17:17

    I didn't care about the tabs filling the width, but I cared that the background color wasn't expanding to the full width. So I thought of this solution, where I put a FrameLayout behind it with the same background color as the tabs.

    
        
    
    

提交回复
热议问题