Menu items are not shown in SherlockFragmentActivity with tabs - menu

My application runs on Gingerbread. It can properly show action-bar menu-item in normal SherlockFragmentActivity but when I add a menu item in an Activity with tabs the item is not shown. I was expecting to see the item above the tabs on the right of the name.
Is that normal or I'm doing something wrong?
I can add normal options-menu item that are properly show in the menu.
So the main question is: did someone manage to show both the tabs and the action-bar?

You're doing something wrong. Including other menu options doesn't have any issue. If you're using the actionbar spinner, then it's a different case as that wont work with tabs.

try adding the item in PrepareOptionsMenu in place of CreateOptionsMenu
I hope this will work

Related

How do I define the items in the menu row or even better have the default format menu item appear in the toolbar?

I changed menu to this:
menubar: 'format table tools help'
But what appears in the menu in my editor is just format. Table, tools, and help don't appear. Why is that so?
Also, if I want to get rid of the menubar I know I need to set
menubar: false
but is there a way of getting that nice format item from the menubar into the toolbar?
Thanks.
In order for the item to appear in the menu you also need to load the plugin itself. If (for example) you don't load the help plugin TinyMCE won't show a Help menu because the underlying functionality is not loaded.
is there a way of getting that nice format item from the menubar into
the toolbar?
The short answer is "no". A menu item and a toolbar item are different. That being said, many of the capabilities exposed via the Menubar can also be exposed via the Toolbar.
Here is an example of loading both the Help menu option as well as the toolbar button.
https://fiddle.tiny.cloud/S5haab

Callisto Ratings tab navigation

I'm using Callisto to add ratings to my app. Everything works fine but the tab navigation for this control.
Any idea about how to support tab navigation for this control, like the "Store" app for example? The idea is select the control (focus) and select the rating value with left/right keys (like a slider)
Thanks in advance!
The tab navigation works but it takes more tabs to hop from one rating item to another. I recommend you to use FocusWatcher class, you will be able to figure out the situation.

Watir- How can I put a hover on any HTML element

I have a web application, in that application the head menus open when we move mouse on to that (I don't want to click on that head menus because clicking on that menus redirect the page to another page).
On mouse over it opens a menu list, I will be able to select the menu item but not able to hover on to the head menu so that a drop-down menu list can appear.
fire_event("onmouseover") is not working, it is only flashing that menu(element) but not opening the drop down menu list.
Can any one give me the solution How can I put hover on to any HTML element please.
Well, there is #hover method:
browser.element(:how => what).hover
And this could also help: How to find out which JavaScript events fired?
For some reason .hover doesn't work for me, but this one does:
browser.element(how: what).fire_event(:mouseover)
No idea why.

How to add custimized context menu item on right click in browser window?

Here I want to add my custom menu option i.e. ColorZilla, Aptana Studio on web browser right click
You can only do this with a browser plugin. Each browser will have its own syntax for plugins and specifically adding context menu items.
Aleks G. is right you cannot do that directly within the browser.
I don't know if it can help you or if it is what you are looking for but, within the browser you can handle the right click interaction in order to display your own custom menu ( not a particular menu item but the full menu ) ... meaning the default browser menu won't get displayed at all.
In case you are interested, you can have a small sample here

dijit.MenuItem values are auto-highlighted... how to stop this?

I am using Dojo 1.3.1 and have a dijit.Menu with several dijit.MenuItem items. The menu is displayed as a context menu when the user right-clicks on items that were bound to the menu using (dijit.byId("contextmenu_pf")).bindDomNode(...). All works well, but frequently when the menu is displayed, one or more of the menu items are highlighted (aside from the first one). This seems to be random and has no relationship to previously selected items. Some of the highlighted menu options are even displayed.
Has anyone seen this behavior and/or know how to stop it from happening?
Thanks - Peter
This is a known issue, filed as http://bugs.dojotoolkit.org/ticket/10339.
The attachment in that link also lists some workaround code.

Resources