how we can add menu item dynamically

后端 未结 5 628
清歌不尽
清歌不尽 2020-12-13 10:50

hi frnds am creating an application which is a tab application.

in my Home which extends sherlockFragmentActivity, i am inflating menu.xml and includes code for on o

5条回答
  •  借酒劲吻你
    2020-12-13 11:17

    use onPrepareOptionsMenu method and clear all menu first using

    menu.clear();
    

    then add menu.

    Also refer here.. check its onPrepareOptionsMenu method

提交回复
热议问题