But why do the google apps (like Google+) use overflow in the action bar on devices with physical menu button if this is considered bad?
Am Dienstag, 5. Juni 2012 22:30:49 UTC+2 schrieb Dianne Hackborn: > > Oh good lord, don't freaking do that. > > On Tue, Jun 5, 2012 at 12:10 PM, b0b <pujos.mich...@gmail.com> wrote: > >> >> >> >>> Unless I missed something in the previous discussions, or there has >>> been a breakthrough since, there is NO possible way to make the >>> overflow button show up if there is a physical hardware key. >>> >>> >>> >> There is. With hack below you can force the appearance of the overflow >> menu even if there is a physical button menu >> with target SDK >= 14. Of course you must never use it since it is a >> horrible hack, and nobody shall use hacks ever, especially on Android ! >> >> static public void setHasPermanentMenuKey(Context context, boolean value) >> { >> if (isICSOrLater()) { >> ViewConfiguration config = ViewConfiguration.get(context); >> try { >> Field f = ViewConfiguration.class >> .getDeclaredField("sHasPermanentMenuKey"); >> f.setAccessible(true); >> if (f != null) { >> f.set(config, value); >> log.info("Successfully hacked permanent menu key"); >> } >> } catch (Exception ex) { >> log.info("Unable to hack permanent menu key: " + ex); >> } >> } >> } >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en