How to disable click effect on TabLayout?
Try to change the tab background as transparent app:tabBackground="@android:color/transparent"
, like below
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_height"
app:tabBackground="@android:color/transparent"
app:tabMode="fixed" />
It does work, I have verified.
tabLayout.setTabRippleColorResource(android.R.color.transparent);
Do this:
app:tabRippleColor="@null"
This basically disables the ripple background resource.
Use app:tabRippleColor="@null"
<android.support.design.widget.TabLayout
android:id="@+id/homeTabLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/custom_tab_layout_height"
android:layout_alignParentBottom="true"
android:background="@color/white"
android:tabStripEnabled="true"
app:tabBackground="@color/white"
app:tabGravity="fill"
app:tabIndicatorHeight="0dp"
app:tabMode="fixed"
app:tabPaddingEnd="-1dp"
app:tabPaddingStart="-1dp"
app:tabRippleColor="@null" />
This works for me.