Im a creating and options menu dynamically, the option menu depends on data that is created during the onCreate() stage.
The problem is that onCreateOptionsMenu() is called before the data is created. Is there a way to execute after onCreate() ?
Thanks
Fabii
You can use
invalidateOptionsMenu(), but it requires API level 11.Also, you can choose to override
onPrepareOptionsMenu()instead, which will give you to opportunity to modify the menu before it is displayed each time.