I am working on android application . In which I have to set image on specific position on screen. Problem comes up when on screen button like in this image comes up!
I googled alot but didn't find any help. Is there any way programatically to detect these on screen buttons ? Thank you for your help.
you can check for hasPermanentMenuKey
using
boolean hasMenuKey = ViewConfiguration.get(context).hasPermanentMenuKey();
if that returns true it means you dont have the soft keys.
regarding different APIs level don't worry about honeycomb
because they don't have soft keys, for more read on different APIs please refer to this answer.
Report if the device has a permanent menu key available to the user.
As of Android 3.0, devices may not have a permanent menu key available. Apps should use the action bar to present menu options to users. However, there are some apps where the action bar is inappropriate or undesirable. This method may be used to detect if a menu key is present. If not, applications should provide another on-screen affordance to access functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With