Here\'s what I\'d like to remove :
How do I replace the indicator show
I have yet another hack.
TabLayout tabLayout = (TabLayout) fragmentView.findViewById(R.id.tabs);
tabLayout.setSelectedTabIndicatorHeight(0);
It's basically the same idea as Eleojasmil's.
Try setting the Tab indicator height to zero:
tabLayout.setSelectedTabIndicatorHeight(0);
Use
tabLayout.setSelectedTabIndicator(null);
This will set the selected indicator drawable to null.
This line app:tabIndicatorHeight="0dp"
solve the problem for me in xml
<android.support.design.widget.TabLayout
android:id="@+id/view_bottom_tabLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabIndicatorHeight="0dp" //this line
app:tabGravity="fill"
app:tabMode="fixed" />
Use tabLayout.setSelectedTabIndicator(0)
.
tabLayout.setSelectedTabIndicatorHeight(0)
is now deprecated and tabLayout.setSelectedTabIndicatorColor(Color.TRANSPARENT)
won't perform as well because it uses transparency.
For the best setting app:tabIndicatorHeight="0dp"
worked for me.