I'd tested my app on a Nexus 10 (Android 4.2.1), and the overflow menu on the action bar worked fine. So I was dumbfounded when the overflow menu didn't appear on a Galaxy note 2. After reading Android action bar not showing overflow and How To Control use of OverFlow Menu in ICS, I eventually realised that on the Galaxy note 2 there's a built in menu button, and the "overflow menu" comes up if one presses that button.
The responses to those two questions suggest that one should not use the code there to disable to permanent menu button, because although it has the effect of (a) making the overflow menu appear in the action bar, apparently it also (b) forces the same behavior in other apps too. However, for me the overflow menu in the action bar is far superior to the menu button, and comments left on those two questions suggest that some other people think so too.
My question is, what is it possible to use that code to disable the permanent menu button in onResume(), and re-enable it in onPause()? How reliable a method would that be to make the action bar overflow menu work in my chosen app, with all other apps left unchanged?
Just for the record, it seems to me that the Android designers (both software and hardware) have somehow conspired to create this problem, and there's no easy solution. Some programmers think that having all apps work in the same way on a single device is more important than having any particular app work the same way across different devices. Other programmers think the opposite.
.
stackoverflow.comm
No comments:
Post a Comment