1

Overriding onContextItemSelected() in ActionBarSherlock

view story
linux-howto

http://stackoverflow.com – I have a class that extends SherlockActivity because I'm using an ActionBarSherlock action bar in the activity. However, I'm also trying to add a context menu to a listview in this activity that launches when an item in the listview is longpressed. I'm getting an error in my declaration of onContextItemSelected(MenuItem item) that says that my override is invalid because there's nothing to override. However, when I remove the override, the function is never called. I know this has something to do with the way SherlockActivity inherits from Activity but I'm not sure about the specifics. Maybe I (HowTos)