Reputation: 1509
I'm working through the 'notepad' tutorial given in the developer's guide: http://developer.android.com/guide/tutorials/notepad/index.html
For some reason, even when i'm using their solution files, the context menu does not come up with i 'click and hold' on a list entry.
The class extends ListActivity, and calls "registerForContextMenu(getListView());"
but I never see the context menu fire.
Any idea what's wrong with it?
Upvotes: 2
Views: 667
Reputation: 1
You need to click the menu to bring up the 'Add Item' option.
If you're using the emulator, the menu is the icon on the bottom left that looks like a 2X3 array.
Upvotes: 0
Reputation: 4258
The way they lay out the rows in that tutorial means that you can only actually make a selection on text, not just the row it's on. Are you pressing on the row itself?
You can fix that by using fill_parent instead of wrap_content in the layout_width attributes of the LinearLayout and ListView in notes_list.xml, and in the TextView inside notes_row.xml
Upvotes: 1