Android Development
How to Dynamically or Programmatically Add Menu Items for an Android Activity
Sometimes you don’t need huge menu. And int is’t super important create XML file for it. You can just create your menu from code. It is very simple. You need override ` public boolean onPrepareOptionsMenu(Menu menu) ` method. Let’s see the example below: @Override public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); Read more…