Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Add ContextMenu to a customized View in Android

In Android, we may sometimes need to add ContextMenu to a View, it's not so easy to add ContextMenu to a customized View. Here we explain how to add ContextMenu to a customized View.First, we may need to create View.OnCreateContextMenuListener so that the customized view can register for it.Here is the class definition:public class GraphView extends View {    private View.OnCreateContextMenuListener vC = new View.OnCreateContextMenuListener() {        @Override        public void onCreateContextMenu(ContextMenu menu, Vi...

9,559 0       ANDROID CONTEXTMENU CUSTOMIZED VIEW