List of usage examples for android.content.res Configuration NAVIGATION_NONAV
int NAVIGATION_NONAV
To view the source code for android.content.res Configuration NAVIGATION_NONAV.
Click Source Link
From source file:com.vuze.android.remote.AndroidUtils.java
public static boolean usesNavigationControl() { Configuration configuration = VuzeRemoteApp.getContext().getResources().getConfiguration(); if (configuration.navigation == Configuration.NAVIGATION_NONAV) { return false; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_FINGER) { return false; } else if (configuration.navigation == Configuration.NAVIGATION_DPAD) { return true; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH) { return true; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_UNDEFINED) { return true; } else if (configuration.navigationHidden == Configuration.NAVIGATIONHIDDEN_YES) { return true; } else if (configuration.uiMode == Configuration.UI_MODE_TYPE_TELEVISION) { return true; }//from w ww. ja v a 2 s.c o m return false; }
From source file:com.miz.functions.MizLib.java
/** * Determines if the device uses navigation controls as the primary navigation from a number of factors. * @param context Application Context/*from w w w .j a v a 2s. com*/ * @return True if the device uses navigation controls, false otherwise. */ public static boolean usesNavigationControl(Context context) { Configuration configuration = context.getResources().getConfiguration(); if (configuration.navigation == Configuration.NAVIGATION_NONAV) { return false; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_FINGER) { return false; } else if (configuration.navigation == Configuration.NAVIGATION_DPAD) { return true; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_NOTOUCH) { return true; } else if (configuration.touchscreen == Configuration.TOUCHSCREEN_UNDEFINED) { return true; } else if (configuration.navigationHidden == Configuration.NAVIGATIONHIDDEN_YES) { return true; } else if (configuration.uiMode == Configuration.UI_MODE_TYPE_TELEVISION) { return true; } return false; }