menuitem-selection

how to save menuitem visibility state through sharedpreferences?

萝らか妹 提交于 2019-12-06 12:23:14
问题 Hi In my app I add a menuitem on the action bar called "add to favorite" shown by white star icon. When user click it this icon become disappear and other yellow star icon item visibility comes up...this works fine..but the problem is that when I switch to another activity or when I restart my app the previous event has been lost. How can I save this through sharedpreferences? ?.. Here my code. On prepareoptionmenu (Menu menu){ If (ffavClicked){ menu.finditem (R.id.id_favorite).setvisible

uimenucontroller in uiwebview with custom menu items without MORE menu

安稳与你 提交于 2019-12-05 02:27:57
问题 In my iPad app, there is a UIWebview that displays text content. When I tap hold and select a text, a menu should popup with 2 custom menu. say, | MENU1 | MENU2 | But it seems the COPY menu will also accompany, which I couldn't disable. Is there any possibilities to disable it? I tried around the forum and no solutions worked out. so itz okay to keep the COPY menu along with the other 2. which should now look like | Copy | MENU1 | MENU2 | But unfortunately, I 'm getting it displayed with a

uimenucontroller in uiwebview with custom menu items without MORE menu

回眸只為那壹抹淺笑 提交于 2019-12-03 17:20:43
In my iPad app, there is a UIWebview that displays text content. When I tap hold and select a text, a menu should popup with 2 custom menu. say, | MENU1 | MENU2 | But it seems the COPY menu will also accompany, which I couldn't disable. Is there any possibilities to disable it? I tried around the forum and no solutions worked out. so itz okay to keep the COPY menu along with the other 2. which should now look like | Copy | MENU1 | MENU2 | But unfortunately, I 'm getting it displayed with a MORE menu as follows : | Copy | More... | Clicking the More... menu is showing the other 2 menu. But I