I had some problems posting a response here so Justin Anderson wrote me the solution via mail. Since that may be interesting for somebody else I want to write it down here. I was using addSubMenu() to add fields to the context menu which was wrong, I should have been using add() to do this. So using add() instead of addSubMenu() solved the problem.
Thank you so much for your help! :) On 3 Jul., 17:09, Justin Anderson <[email protected]> wrote: > I did a quick comparison between your code and mine and found a few > differences between my code and yours... > > Try removing this line of code: > *registerForContextMenu(getExpandableListView());* > > And replace it with this: > getExpandableListView().setOnCreateContextMenuListener(this); > > In theory you shouldn't have to have the above line because > ExpandableListActivity should be doing that for you since it implements > View.OnCreateContextMenuListener, but it seems there is a bug (at least in > the 1.6 SDK) and this doesn't happen by default. > > Also, place "@Override" in front of your onCreateContextMenu() and > onContextItemSelected() methods to ensure that you are overriding the > default behavior. > > Hope that helps, > Justin > > ---------------------------------------------------------------------- > There are only 10 types of people in the world... > Those who know binary and those who don't. > ---------------------------------------------------------------------- > > On Sat, Jul 3, 2010 at 2:56 AM, Bender <[email protected]> wrote: > > Maybe I should add the following: The second context menu which pops- > > up doesn't contain the items from the first context menu. For example: > > my context menu contains "delete" and "edit", when I push and hold one > > category, the first context menu pops up with "delete" and "edit", > > when I choose "delete" that context menu closes, the category gets > > deleted and a new menu pops up where is only written "category" but no > > options to choose from. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Beginners" group. > > > NEW! Try asking and tagging your question on Stack Overflow at > >http://stackoverflow.com/questions/tagged/android > > > To unsubscribe from this group, send email to > > [email protected]<android-beginners%[email protected]> > > For more options, visit this group at > >http://groups.google.com/group/android-beginners?hl=en -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en

