I have tabs inside TabLayout and sometimes I need disable some tab, for example tab1 (I don´t need disable all of them, only some of them). Disable means it is not possible tap on it. How can I do that?
<com.google.android.material.tabs.TabLayout
android:id="@+id/switchLayout"
android:layout_width="match_parent">
<com.google.android.material.tabs.TabItem
android:id="@+id/tab1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/custom" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/custom" />
<com.google.android.material.tabs.TabItem
android:id="@+id/tab3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout="@layout/custom" />
</com.google.android.material.tabs.TabLayout>