I disable/enable an action item (represented with an icon, not in the overflow menu) on the Action Bar based on if the action is allowed or not. I would like to add a Toast when the user taps on the disabled action item icon to inform why this is disabled. Is it possible to detect a tap on a disabled item in the action bar??
Thanks
No, because it is disabled. Your alternative is to leave the action item enabled, but change icons instead of enable/disable, so you get control in all cases. This is not the best from an accessibility standpoint (those who cannot see your icon will not necessarily realize that it is “disabled”).