List of usage examples for android.content.res Configuration TOUCHSCREEN_FINGER
int TOUCHSCREEN_FINGER
To view the source code for android.content.res Configuration TOUCHSCREEN_FINGER.
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 www . j ava2 s . c om*/ 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 ww w .j a v a 2 s . c o m * @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; }