Home > other >  How to disable an animation when Tab is selected in TabLayout android
How to disable an animation when Tab is selected in TabLayout android

Time:09-29

The grey color appears for fraction of seconds when I touch on TabLayout. how to disable it?enter image description here

CodePudding user response:

The gray color you see after clicking the TabLayout is a ripple color. You can disable that by setting app:tabRippleColor="@null" in your XML.

Here is the code

  <com.google.android.material.tabs.TabLayout
        android:id="@ id/tabLayout"
        app:tabRippleColor="@null"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
    </com.google.android.material.tabs.TabLayout>
  • Related