1

Unwanted click events in Android after showing a dialog

view story
linux-howto

http://stackoverflow.com – CONTEXT: I have a simple ListActivity (call it "Activity1") that contains a ListView and a number of menu items. Clicking an item in the ListView shows a popup dialog. Clicking a menu item button (let's call it "Button") in the ActionBar starts an Activity (let's call it "Activity2") using startActivityForResult() PROBLEM: If the user touches a ListView item, generating an onListItemClick() event in the ListActivity and then really quickly touches Button, a onOptionsItemSelected() event is posted to the message queue and processed in due course. This results in the following odd behaviour: (HowTos)