Topic
  • 6 replies
  • Latest Post - ‏2012-11-20T19:23:05Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts

Pinned topic Migration Option Menu to Action Bar

‏2012-11-20T16:48:08Z |
Current Worklight is using Option Menu for setings etc in Android. But above API Level 11, Option Menu will not be available any more. How to migration Option Menu to Action Bar above API level 11?

Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T16:56:22Z  
    While the menu button is going away, Android provides backwards compatibility. If you have a newer phone like the Galaxy Nexus, and you open an app with the old Options Menu it will display the 3 dots next to the onscreen multitasking button to display it.

    Furthermore, the new standard is to include it in your action bar. If you ate building a native page, check this out: http://developer.android.com/guide/topics/ui/menus.html.

    Ralph Pina
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T18:00:05Z  
    While the menu button is going away, Android provides backwards compatibility. If you have a newer phone like the Galaxy Nexus, and you open an app with the old Options Menu it will display the 3 dots next to the onscreen multitasking button to display it.

    Furthermore, the new standard is to include it in your action bar. If you ate building a native page, check this out: http://developer.android.com/guide/topics/ui/menus.html.

    Ralph Pina
    Thanks for your reply Ralph

    The issues I have here is I need API level at least 11. So the minSdkVersion or targetSdkVersion is 11. If you set Android project like that, the 3 dots next to the onscreen multitasking button will not be appeared. In my 4.1.2 Galaxy Nexus, it is shown there and in Nexus 7 4.2 it is not there.

    If need a migration plan to move Option Menu to Action Bar automatically, what is the best approach?

    Jerry
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T18:23:39Z  
    Thanks for your reply Ralph

    The issues I have here is I need API level at least 11. So the minSdkVersion or targetSdkVersion is 11. If you set Android project like that, the 3 dots next to the onscreen multitasking button will not be appeared. In my 4.1.2 Galaxy Nexus, it is shown there and in Nexus 7 4.2 it is not there.

    If need a migration plan to move Option Menu to Action Bar automatically, what is the best approach?

    Jerry
    I don't know that there is a way to migrate the menu. I believe that Google promised the 3 dots approach for backwards compatibility, but the advice was for devs to migrate to the action bar.

    Can I ask what exactly you are doing? Why can't you just code the menu in the action bar from scratch?

    I think the Option Menu option in WL made sense when all devices had this button. But I am guessing WL will deprecate it in the future.

    Ralph Pina
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T18:35:09Z  
    I don't know that there is a way to migrate the menu. I believe that Google promised the 3 dots approach for backwards compatibility, but the advice was for devs to migrate to the action bar.

    Can I ask what exactly you are doing? Why can't you just code the menu in the action bar from scratch?

    I think the Option Menu option in WL made sense when all devices had this button. But I am guessing WL will deprecate it in the future.

    Ralph Pina
    The option menus are designed for Android app navigation purposes. If there is no option menu shown up, the navigation is broken. Since the option menus are there, it is quite common to move it to action bar since google encourage to do it. But got some difficulty to show the action bar when testing WL app. It is not shown at all. Now still try to dig how to bridge them together:)

    Jerry
  • IdanAdar
    IdanAdar
    741 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T18:36:41Z  
    There is currently no Action Bar support. It is something to look at.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: Migration Option Menu to Action Bar

    ‏2012-11-20T19:23:05Z  
    • IdanAdar
    • ‏2012-11-20T18:36:41Z
    There is currently no Action Bar support. It is something to look at.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    Looks like 4.2 bug to show three dot.

    While waiting for the fix from Google put tap and hold event to invoke option menu. Works in 4.2 Nexus 7.

    Thanks everyone who helped!

    Jerry