Contextual Action Bar (CAB) passing touch events to Action Bar

56 views Asked by At

In my Activity i have an ActionBar with two action items. In this same activity i display contextual action bar with one action item for selecting multiple items and deleting them.

The problem i am facing is contextual action bar is passing the touch events to the action bar lying behind. So when i click on the contextual action bar the touch event is getting passed to action bar and it is processing onOptionItemSelected.

How do i avoid this?

One way i can think of is storing the ActionMode as a field in the activity and then using that to find if the action mode is visible and decide whether to process the onOptionItemSelected call.

Any other way that this can be avoided?

0

There are 0 answers