Question

I create a context menu like this:

@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
  if(v.getId() == R.id.ListView01) {
      getMenuInflater().inflate(R.menu.add_contextmenu, menu);
  }
  super.onCreateContextMenu(menu, v, menuInfo);
}

How can I now set a generated title?

Was it helpful?

Solution

menu.setHeaderTitle("This is my title");

See ContextMenu.setHeaderTitle

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top