[android-beginners] Context menu from button
Hi All, How do I create a custom context menu for a button widget? So that when you press and hold on a button, it displays a custom context menu? Thank you. -- 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 android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en
Re: [android-beginners] Context menu from button
Sonic wrote: How do I create a custom context menu for a button widget? So that when you press and hold on a button, it displays a custom context menu? Step #1: Call registerForContextMenu() on your Activity to say what widget needs the menu Step #2: Implement onCreateContextMenu() in your Activity to define the menu Step #3: Implement onContextItemSelected() in your Activity to get control on a menu choice http://github.com/commonsguy/cw-android/tree/master/Database/Constants/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android 2.0 Programming Books: http://commonsware.com/books -- 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 android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en