1

this screen shot is for android 4.3 on tablet size and i'm trying to fill columns to fix them like with match_parent

enter image description here

my xml layout:

   <android.support.design.widget.TabLayout
       android:id="@+id/categoriesTabsLayout"
       android:layout_width="match_parent"
       android:layout_height="40dp"
       android:background="@color/colorPrimaryDark"
       app:tabGravity="fill"
       app:tabMode="fixed"
       app:tabSelectedTextColor="@color/white"
       app:tabTextColor="@color/white"
       />
DolDurma
  • 15,753
  • 51
  • 198
  • 377

1 Answers1

0

You should add tabMaxWidth.

The maximum width for tabs.

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters) .

<android.support.design.widget.TabLayout
      app:tabMaxWidth="0dp"
       />

You can check Tabs in TabLayout not filling up .

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198