Redefined the onCreateContextMenu method onCreateContextMenu the heir of the ListFragment like this:

 @Override public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo info) { super.onCreateContextMenu(contextMenu, view, info); contextMenu.setHeaderTitle("Test"); contextMenu.add("Example"); } 

But I found only methods that allow you to create a context menu with text only. And how to make it possible to present the menu item as ImageView + TextView ? In the interface android.view.Menu , it seems there is no possibility for this.

    1 answer 1

    The context menus on the android do not natively support icons, see the documentation:

    Note: Context menu items do not support icons or shortcut keys.

    But, as always, the missing functionality can be emulated on its own , as it is done, you can see in this reference.