Understanding why onCreateOptionsMenu is not displaying a menu

后端 未结 4 487
故里飘歌
故里飘歌 2021-01-21 12:11

I\'m reading through Android For Dummies. One example makes use of the onCreateOptionsMenu (I\'ve added a log message):

@Override
public boolean onCreateOptionsM         


        
4条回答
  •  清酒与你
    2021-01-21 12:45

    onCreateOptionsMenu() is called when activity created .We dont need to call it explicitly. Check whether your activity has title bar or not.If dont then make it visible or remove no title bar property in activity.Try it may it work.

提交回复
热议问题