Android TabLayout tabPaddingTop and tabPaddingBottom not being removed
<p>Here is my tab layout XML</p>

<pre><code>&lt;android.support.design.widget.TabLayout
            android:id="@+id/tabs"
            android:layout_width="match_parent"
            android:layout_height="@dimen/custom_tab_layout_height"
            android:background="@color/tab_background_primary"
            app:tabGravity="fill"
            app:tabIndicatorColor="@color/primary_white"
            app:tabIndicatorHeight="3dp"
            app:tabMinWidth="120dp"
            app:tabMode="scrollable"
            app:tabPaddingStart="-1dp"
            app:tabPaddingEnd="-1dp"
            app:tabPaddingTop="1dp"
            app:tabPaddingBottom="1dp"
            /&gt;
</code></pre>

<p>It is removing the horizontal padding in between tabs but not the tabPaddingTop and tabPaddingBottom. </p>

<p>How do I remove the top and bottom padding to make each tab match the tabLayout height?</p>

<p><a href="https://i.stack.imgur.com/wvLFk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wvLFk.png" alt="enter image description here"></a></p>

<p>Custom view for each tab</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/tab"
android:textColor="@color/primary_white"
android:textSize="14sp"
android:textStyle="bold"
android:gravity="fill"
android:fontFamily="@string/font_fontFamily_medium"/&gt;
</code></pre>

<p>I also tried using a Linear Layout with Imagview and Textview as custom view</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:gravity="fill"
android:layout_height="match_parent"&gt;

&lt;ImageView
    android:id="@+id/tab_logo"
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:src="@mipmap/ic_settings_light"/&gt;

&lt;TextView
    android:layout_width="wrap_content"
    android:layout_height="match_parent"
    android:id="@+id/tab_title"
    android:textColor="@color/primary_white"
    android:textSize="14sp"
    android:textStyle="bold"
    android:gravity="center"
    android:text="test"
    android:fontFamily="@string/font_fontFamily_medium"/&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>And here is how I inflated the custom tab view (for custom view with textView)</p>

<pre><code>TextView tabTwo = (TextView) LayoutInflater.from(this).inflate(R.layout.custom_tab, null);
    tabTwo.setText("CASH IN");
    tabTwo.setBackgroundColor(Color.parseColor("#EC5A0B"));
    tabTwo.setCompoundDrawablesWithIntrinsicBounds(R.mipmap.ic_action_cash_light, 0, 0, 0);
    tabLayout.getTabAt(1).setCustomView(tabTwo);
</code></pre>

<p>As you can see, I am trying to give different background color to each tab. But the padding at top and bottom is still there. </p>