title: How to add divider between two tabs
body: <p>I have work in a activity contains tabs. i need to set divider between two tabs</p>
  
  <p><a href="https://i.stack.imgur.com/izb8J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/izb8J.png" alt="enter image description here"></a>
  i need a white horizontal divider line between all tabs</p>
  
  <p><strong>Here is my code</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"
  android:background="@color/social_bkg"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:padding="10dp"
      android:layout_below="@+id/banner_layout"&gt;
  
      &lt;TabHost
          android:id="@android:id/tabhost"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          &gt;
  
          &lt;LinearLayout
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:orientation="vertical"&gt;
  
              &lt;HorizontalScrollView
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:fillViewport="true"
                  android:scrollbars="none"&gt;
  
                  &lt;TabWidget
                      android:id="@android:id/tabs"
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:divider="@drawable/tab_divider"
                      android:tabStripEnabled="false"&gt;
  
                  &lt;/TabWidget&gt;
  
              &lt;/HorizontalScrollView&gt;
  
              &lt;FrameLayout
                  android:id="@android:id/tabcontent"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"&gt;
  
  
                  &lt;LinearLayout
                      android:id="@+id/tab1"
                      android:layout_width="match_parent"
                      android:layout_height="match_parent"
                      android:background="@color/white"
                      android:orientation="vertical"&gt;
  
                      &lt;WebView
                          android:id="@+id/business_tab_webView"
                          android:layout_width="match_parent"
                          android:layout_height="match_parent"/&gt;
  
                  &lt;/LinearLayout&gt;
              &lt;/FrameLayout&gt;
          &lt;/LinearLayout&gt;
      &lt;/TabHost&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Main Activity</strong></p>
  
  <p>In this main activity i have dynamically create tabs dynamic tabs are created no problem but dividers are not showing</p>
  
  <pre><code>eventTabHost = (TabHost) findViewById(android.R.id.tabhost);
  eventTabHost.setup();
  eventTabHost.getTabWidget().setShowDividers(TabWidget.SHOW_DIVIDER_MIDDLE);   eventTabHost.getTabWidget().setDividerDrawable(R.drawable.tab_divider);
  </code></pre>
  
  <p><strong>tab_divider</strong></p>
  
  <p>by using this i create divider resourse file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
  &lt;size android:width="1dp" /&gt;
  &lt;solid android:color="#ffffff" /&gt;
  &lt;/shape&gt; 
  </code></pre>