本文整理汇总了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;
}
示例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;
}
示例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);
}
示例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);
}
示例5: getCombiningRulesExtraValue
import android.view.inputmethod.InputMethodSubtype; //导入方法依赖的package包/类
public static String getCombiningRulesExtraValue(final InputMethodSubtype subtype) {
return subtype.getExtraValueOf(COMBINING_RULES);
}