onCreateContextMenu() is called when you long-press (roughly 2 seconds) on
the note itself...

The menu button is not supposed to be used to display menus that change
based on the current context... it is for menus that do not depend on a
selection, like Settings, Help, etc...

Hope this helps,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Wed, Oct 7, 2009 at 5:02 AM, GD <[email protected]> wrote:

>
> Hi all
> I am a beginner and I am trying the Notepad tutorial ( exercise 2 to
> be precise).
>
> In this onCreateContextMenu() is used to show delete menu. But when I
> select a note and press "Menu" , onCreateContextMenu()  is not called;
> instead onCreateOptionsMenu() is called.
> The tutorial suggests calling registerForContextMenu(getListView());
> in onCreate().
>  But still it is not called.
>
> I tried getListView().setOnCreateContextMenuListener(this);
> still not use.
>
> Has someone seen this issue? Any suggestion what can be wrong ?
>
> Thanks
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to