title: Adding a line below TabLayout
body: <p>I'm having a trouble trying to add a line below the <code>TabLayout</code>, but it has to be behind the selector line. Should be something like this:</p>
  
  <p><a href="https://i.stack.imgur.com/xkXd4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xkXd4.png" alt="Exemple"></a></p>
  
  <p>I already tried to add a custom view, but each tab have some margin inside, so didn't worked out.</p>
  
  <p>any ideas?</p>
  
  <p>This is what I got right now:</p>
  
  <p><a href="https://i.stack.imgur.com/CXUkm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CXUkm.png" alt="current_tablayout"></a></p>
  
  <p>Here its how i'm adding it on XML:</p>
  
  <pre><code>&lt;android.support.design.widget.TabLayout
      android:id="@+id/tabs"
      android:layout_width="match_parent"
      android:layout_height="60dp"
      app:tabBackground="@color/white"
      app:tabIndicatorColor="@color/colorAccent"
      app:tabTextColor="@color/white"/&gt;
  </code></pre>
  
  <p>and this is what i'm doing via code:</p>
  
  <pre><code>private void configureTabLayout() {
      TabLayout.Tab tabHome = mTabLayout.newTab().setIcon(R.drawable.ic_home_cinza);
      TabLayout.Tab tabEmprestimos = mTabLayout.newTab().setIcon(R.drawable.ic_emprestimos_cinza);
      TabLayout.Tab tabPersonal = mTabLayout.newTab().setIcon(R.drawable.ic_usuario_cinza);
  
      View root = mTabLayout.getChildAt(0);
      if (root instanceof LinearLayout) {
          ((LinearLayout) root).setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);
          GradientDrawable drawable = new GradientDrawable();
          drawable.setColor(getResources().getColor(R.color.silver));
          drawable.setSize(2, 1);
          ((LinearLayout) root).setDividerPadding(10);
          ((LinearLayout) root).setDividerDrawable(drawable);
      }
  
      mTabLayout.addTab(tabHome);
      mTabLayout.addTab(tabEmprestimos);
      mTabLayout.addTab(tabPersonal);
      mTabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
  }
  </code></pre>