android - How do I disable sliding tabs when in contextual action bar, by making the tabs not clickable/swipeable? -
i have toolbar, have attached sliding tab layout, using these 2 classes: slidingtablayout, slidingtabstrip.
when long press item, contextual action bar appears , overlays toolbar, using <item name="windowactionmodeoverlay">true</item>
in styles.xml. problem tabs still clickable, , swipable. have tried setclickable(false)
, didn't work.
how make tabs not clickable, can change "state look" of tabs disabled state, code in xml file within drawable folder, seen 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 appreciated thanks.
put flag in slidingtablayout isactionmodeenabled.
set every time action mode created , unset on every destruction.
based on configure onclick() of tabclicklistener class if isactionmodeenabled == true nothing , change background of tabviews or whatever want it.
Comments
Post a Comment