9

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?

Tobias
  • 7,282
  • 6
  • 63
  • 85
  • (it might be because I'm sleep deprived and therefore slow to understand but) what do you call "generated context title", do you mean the title of your app that appears in the bar of your app ? – Jason Rogers Jan 13 '11 at 02:32

1 Answers1

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

See ContextMenu.setHeaderTitle

Ian G. Clifton
  • 9,349
  • 2
  • 33
  • 34