How to disable this click effect?
I tried to add these to Activity's theme but not working
<item name="tabIndicatorColor">@android:color/transparent</item>
<item name="tabBackground">@android:color/transparent</item>
<item name="tabTextAppearance">@android:color/transparent</item>
<item name="tabSelectedTextColor">@android:color/transparent</item>
I also tried to use the theme in TabLayout directly but the app will crash
And also tried android:stateListAnimator
, but still not working
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
style="@style/AppTheme"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stateListAnimator="@null">
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.
Do this:
app:tabRippleColor="@null"
This basically disables the ripple background resource.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With