title: Tablayout custom view not taking full height android?
body: <p>I have a tablayout with 2 tabs. I am using custom view to set the tabs</p>
  
  <p>Tablayout XML</p>
  
  <pre><code>    &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;android.support.design.widget.TabLayout
          android:id="@+id/tabs"
          android:layout_width="match_parent"
          android:layout_height="60dp"
          app:tabPaddingBottom="-1dp"
          app:tabPaddingEnd="-1dp"
          app:tabPaddingStart="-1dp"
          app:tabPaddingTop="-1dp"
          app:tabGravity="fill"
          app:tabIndicatorHeight="5dp"
          app:tabMode="fixed" /&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/viewpager"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Custom View XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;TextView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:andorid="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:gravity="center"
  android:textColor="@android:color/white"
  andorid:text="XXX" /&gt;
  </code></pre>
  
  <p>Java code for tab set up</p>
  
  <pre><code>private void setupTabIcons() {
      TextView tabOne = (TextView) LayoutInflater.from(getActivity()).inflate(R.layout.tab_text, null);
      tabOne.setBackgroundColor(ContextCompat.getColor(getActivity(),R.color.tabText1));
      tabOne.setText(tabTitle[0]);
      tabLayout.getTabAt(0).setCustomView(tabOne);
  
      TextView tabTwo = (TextView) LayoutInflater.from(getActivity()).inflate(R.layout.tab_text, null);
      tabTwo.setBackgroundColor(ContextCompat.getColor(getActivity(),R.color.tabText2));
      tabTwo.setText(tabTitle[1]);
      tabLayout.getTabAt(1).setCustomView(tabTwo);
  }
  </code></pre>
  
  <p>This is my output
  <a href="https://i.stack.imgur.com/kMu4H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kMu4H.png" alt="Tabs not taking full height"></a></p>
  
  <p>How do I match the height of the textview to tablayout height?</p>