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,809 0       ANDROID CONTEXTMENU CUSTOMIZED VIEW