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

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -