当前位置: 首页>>代码示例>>Java>>正文


Java InputMethodSubtype.getExtraValueOf方法代码示例

本文整理汇总了Java中android.view.inputmethod.InputMethodSubtype.getExtraValueOf方法的典型用法代码示例。如果您正苦于以下问题:Java InputMethodSubtype.getExtraValueOf方法的具体用法?Java InputMethodSubtype.getExtraValueOf怎么用?Java InputMethodSubtype.getExtraValueOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.view.inputmethod.InputMethodSubtype的用法示例。


在下文中一共展示了InputMethodSubtype.getExtraValueOf方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getKeyboardLayoutSetName

import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
@NonNull
public static String getKeyboardLayoutSetName(final InputMethodSubtype subtype) {
    String keyboardLayoutSet = subtype.getExtraValueOf(KEYBOARD_LAYOUT_SET);
    if (keyboardLayoutSet == null) {
        // This subtype doesn't have a keyboardLayoutSet extra value, so lookup its keyboard
        // layout set in sLocaleAndExtraValueToKeyboardLayoutSetMap to keep it compatible with
        // pre-JellyBean.
        final String key = subtype.getLocale() + ":" + subtype.getExtraValue();
        keyboardLayoutSet = sLocaleAndExtraValueToKeyboardLayoutSetMap.get(key);
    }
    // TODO: Remove this null check when InputMethodManager.getCurrentInputMethodSubtype is
    // fixed.
    if (keyboardLayoutSet == null) {
        android.util.Log.w(TAG, "KeyboardLayoutSet not found, use QWERTY: " +
                "locale=" + subtype.getLocale() + " extraValue=" + subtype.getExtraValue());
        return QWERTY;
    }
    return keyboardLayoutSet;
}
 
开发者ID:rkkr,项目名称:simple-keyboard,代码行数:20,代码来源:SubtypeLocaleUtils.java

示例2: getKeyboardLayoutSetName

import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
@Nonnull
public static String getKeyboardLayoutSetName(final InputMethodSubtype subtype) {
    String keyboardLayoutSet = subtype.getExtraValueOf(KEYBOARD_LAYOUT_SET);
    if (keyboardLayoutSet == null) {
        // This subtype doesn't have a keyboardLayoutSet extra value, so lookup its keyboard
        // layout set in sLocaleAndExtraValueToKeyboardLayoutSetMap to keep it compatible with
        // pre-JellyBean.
        final String key = subtype.getLocale() + ":" + subtype.getExtraValue();
        keyboardLayoutSet = sLocaleAndExtraValueToKeyboardLayoutSetMap.get(key);
    }
    // TODO: Remove this null check when InputMethodManager.getCurrentInputMethodSubtype is
    // fixed.
    if (keyboardLayoutSet == null) {
        Log.w(TAG, "KeyboardLayoutSet not found, use QWERTY: " +
                "locale=" + subtype.getLocale() + " extraValue=" + subtype.getExtraValue());
        return QWERTY;
    }
    return keyboardLayoutSet;
}
 
开发者ID:sergeychilingaryan,项目名称:AOSP-Kayboard-7.1.2,代码行数:20,代码来源:SubtypeLocaleUtils.java

示例3: getReplacementString

import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
@NonNull
private static String getReplacementString(@NonNull final InputMethodSubtype subtype,
        @NonNull final Locale displayLocale) {
    if (subtype.containsExtraValueKey(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME)) {
        return subtype.getExtraValueOf(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME);
    }
    return getSubtypeLocaleDisplayNameInternal(subtype.getLocale(), displayLocale);
}
 
开发者ID:rkkr,项目名称:simple-keyboard,代码行数:9,代码来源:SubtypeLocaleUtils.java

示例4: getReplacementString

import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
@Nonnull
private static String getReplacementString(@Nonnull final InputMethodSubtype subtype,
        @Nonnull final Locale displayLocale) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN
            && subtype.containsExtraValueKey(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME)) {
        return subtype.getExtraValueOf(UNTRANSLATABLE_STRING_IN_SUBTYPE_NAME);
    }
    return getSubtypeLocaleDisplayNameInternal(subtype.getLocale(), displayLocale);
}
 
开发者ID:sergeychilingaryan,项目名称:AOSP-Kayboard-7.1.2,代码行数:10,代码来源:SubtypeLocaleUtils.java

示例5: getCombiningRulesExtraValue

import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
public static String getCombiningRulesExtraValue(final InputMethodSubtype subtype) {
    return subtype.getExtraValueOf(COMBINING_RULES);
}
 
开发者ID:sergeychilingaryan,项目名称:AOSP-Kayboard-7.1.2,代码行数:4,代码来源:SubtypeLocaleUtils.java


注:本文中的android.view.inputmethod.InputMethodSubtype.getExtraValueOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。