How can I know programatically if the android device has soft navigation keys or not? -


i want show view above navigation bar if present on device screen, else if not @ bottom of screen.

use method in activity or fragment know whether device has soft navigation bar or not. can code per requirement in method call.

like :-

     if (hasnavbar(getresources()))         {             //do code here           }  public boolean hasnavbar (resources resources)     {         int id = resources.getidentifier("config_shownavigationbar", "bool", "android");         return id > 0 && resources.getboolean(id);     } 

Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -