Skip to content Skip to sidebar Skip to footer

Worklight Optionsmenu

I'm trying to implement optionsMenu in a WL application, testing it in Android (sdk level 10 in my project settings, runtime is Android 4.0.3). But no menu is available. I'm connec

Solution 1:

Since API Level 10, Google has started to introduce new UI controls. One of them is the Action Bar, which is the successor of the Options Menu. Worklight does not have full support for the Action Bar.

As a workaround, in AndroidManifest.xml change the minSdkValue to 8, and this will bring back the 'regular' OptionsMenu. It is in our wishlist for a future release to better handle this situation.

  1. You've declared it correctly.
  2. You can initialize it in wlCommonInit() (located at yourProject\apps\yourApp\common\js\appName.js)
  3. Yes. Be sure they are in the correct resolution per DPI(folder). However, I would put them in nativeResources\res\<dpiFolder>, because if you happen to delete your native folder, these images are gone as well. By putting them in nativeResources, they will be copied to the native folder once it is created upon build.
  4. Yes, see above.

Post a Comment for "Worklight Optionsmenu"