Handling the missing MENU button in new versions of Android (3.x and up)

前端 未结 6 1840
情话喂你
情话喂你 2020-12-08 12:57

I\'m a fan of the menu button as used in Android <3.0, as it was very useful for my game apps - it allowed me to take important but gameplay irrelevant functionality (sav

6条回答
  •  清歌不尽
    2020-12-08 13:59

    Michael, I was in exactly the same situation and solved it by implementing my option menu using a custom dialog. It looks better on ICS than the legacy option menu at the bottom. It is configured like this

    minSdkVersion = 8 targetSdkVersion = 14 SDK build version 8 (in eclipse settings.could set to 14 but I like the type safety it provides)

    Users with API < 10 use the hard menu button and see the standard option menu. Users with API >= 10 see a three dot icon (overflow menu) in the app and when click get my custom dialog menu. They also see the new ICS look in Settings, etc.

    It does not seem that the Menu button is coming back and I wanted to break the legacy barrier even though only <1% of my users use ICS.

提交回复
热议问题