How do I check if the device has virtual buttons?

Asked

Viewed 82 times

1

How to identify devices that have virtual buttons to treat the space they occupy on the screen ?

  • 1

    If you really need this to deal with spaces, then your app should have many problems because it has fixed height, I believe that a lot you can solve by adjusting the layout or putting a simple scrollbar and leaving the navigation fixed.

1 answer

0


You can check if the device has the "virtual" button using the hasPermanentMenuKey android.

Example:

ViewConfiguration.get(context).hasPermanentMenuKey(); // retorna true | false
  • Missed the Moto and 2nd Generation, but not serious to give true ?

  • To complement the answer http://stackoverflow.com/a/13530426/1518921

Browser other questions tagged

You are not signed in. Login or sign up in order to post.