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?
menu.setHeaderTitle("This is my title");
See ContextMenu.setHeaderTitle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With