I have a toolbar to which I linked a sliding tab using these two classes: SlidingTabLayout , SlidingTabStrip .
When I click on an element for a long time, a contextual action bar appears and the toolbar overlays using <item name="windowActionModeOverlay">true</item>.xml in my styles. The problem is that tabs are still clickable and accessible. I tried setClickable(false)that did not work.
How to make tabs inaccessible for clicks so that I can then change the “state” of the tabs to the disabled state with the code in the XML file in the drop-down folder, as shown below.
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_activated="true" android:drawable="@color/primary_dark" />
<item android:drawable="@android:color/transparent" />
Any help is greatly appreciated.
source
share