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
Post a Comment