¿Cómo establecer el divisor entre pestañas en TabLayout de la biblioteca de soporte de diseño?
Estoy usando el nuevoandroid.support.design.widget.TabLayout
dev7-appcompat
biblioteca, y encontró un problema, no hay forma de establecer el divisor entre las pestañas, no sé si existe.
He configurado correctamente el adaptador de buscapersonas y las pestañas se ven bien, pero no puedo establecer el divisor entre las pestañas.
Quiero este tipo de pestañas
Tab1 | Tab2 | Tab3
pero actualmente está mostrando
Tab1 Tab2 Tab3
Mi xml es
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" >
<include layout="@layout/toolbar" />
<android.support.design.widget.TabLayout
android:id="@+id/tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_tabbar_background"
app:tabIndicatorColor="@android:color/white"
app:tabIndicatorHeight="4dp" />
</android.support.design.widget.AppBarLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</android.support.design.widget.CoordinatorLayout>
Estoy agregando pestañas por esto
viewPager = (ViewPager) findViewById(R.id.viewpager);
viewPager.setOffscreenPageLimit(2);
adapter = new TabAdapterLoginActivity(getSupportFragmentManager(),
titles);
viewPager.setAdapter(adapter);
tabLayout = (TabLayout) findViewById(R.id.tablayout);
tabLayout.setupWithViewPager(viewPager);