Java Code Examples for com.android.resources.Keyboard#getEnum()

The following examples show how to use com.android.resources.Keyboard#getEnum() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AndroidManifestParser.java    From java-n-IDE-for-Android with Apache License 2.0 6 votes vote down vote up
/**
 * Processes the supports-screens node.
 * @param attributes the attributes for the supports-screens node.
 */
private void processUsesConfiguration(Attributes attributes) {
    mManifestData.mUsesConfiguration = new UsesConfiguration();

    mManifestData.mUsesConfiguration.mReqFiveWayNav = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_5WAYNAV, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqNavigation = Navigation.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_NAVIGATION, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqHardKeyboard = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_HARDKEYBOARD, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqKeyboardType = Keyboard.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_KEYBOARDTYPE, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqTouchScreen = TouchScreen.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_TOUCHSCREEN, true /*hasNamespace*/));
}
 
Example 2
Source File: AndroidManifestParser.java    From javaide with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Processes the supports-screens node.
 * @param attributes the attributes for the supports-screens node.
 */
private void processUsesConfiguration(Attributes attributes) {
    mManifestData.mUsesConfiguration = new UsesConfiguration();

    mManifestData.mUsesConfiguration.mReqFiveWayNav = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_5WAYNAV, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqNavigation = Navigation.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_NAVIGATION, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqHardKeyboard = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_HARDKEYBOARD, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqKeyboardType = Keyboard.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_KEYBOARDTYPE, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqTouchScreen = TouchScreen.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_TOUCHSCREEN, true /*hasNamespace*/));
}
 
Example 3
Source File: AndroidManifestParser.java    From NBANDROID-V2 with Apache License 2.0 6 votes vote down vote up
/**
 * Processes the supports-screens node.
 *
 * @param attributes the attributes for the supports-screens node.
 */
private void processUsesConfiguration(Attributes attributes) {
    mManifestData.mUsesConfiguration = new UsesConfiguration();

    mManifestData.mUsesConfiguration.mReqFiveWayNav = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_5WAYNAV, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqNavigation = Navigation.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_NAVIGATION, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqHardKeyboard = getAttributeBooleanValue(
            attributes,
            AndroidManifest.ATTRIBUTE_REQ_HARDKEYBOARD, true /*hasNamespace*/);
    mManifestData.mUsesConfiguration.mReqKeyboardType = Keyboard.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_KEYBOARDTYPE, true /*hasNamespace*/));
    mManifestData.mUsesConfiguration.mReqTouchScreen = TouchScreen.getEnum(
            getAttributeValue(attributes,
                    AndroidManifest.ATTRIBUTE_REQ_TOUCHSCREEN, true /*hasNamespace*/));
}
 
Example 4
Source File: TextInputMethodQualifier.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
@Override
public boolean checkAndSet(String value, FolderConfiguration config) {
    Keyboard method = Keyboard.getEnum(value);
    if (method != null) {
        TextInputMethodQualifier qualifier = new TextInputMethodQualifier();
        qualifier.mValue = method;
        config.setTextInputMethodQualifier(qualifier);
        return true;
    }

    return false;
}
 
Example 5
Source File: TextInputMethodQualifier.java    From javaide with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean checkAndSet(String value, FolderConfiguration config) {
    Keyboard method = Keyboard.getEnum(value);
    if (method != null) {
        TextInputMethodQualifier qualifier = new TextInputMethodQualifier();
        qualifier.mValue = method;
        config.setTextInputMethodQualifier(qualifier);
        return true;
    }

    return false;
}