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


Java EditorInfo.IME_ACTION_UNSPECIFIED属性代码示例

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


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

示例1: imeActionName

public static String imeActionName(final int imeOptions) {
    final int actionId = imeOptions & EditorInfo.IME_MASK_ACTION;
    switch (actionId) {
    case EditorInfo.IME_ACTION_UNSPECIFIED:
        return "actionUnspecified";
    case EditorInfo.IME_ACTION_NONE:
        return "actionNone";
    case EditorInfo.IME_ACTION_GO:
        return "actionGo";
    case EditorInfo.IME_ACTION_SEARCH:
        return "actionSearch";
    case EditorInfo.IME_ACTION_SEND:
        return "actionSend";
    case EditorInfo.IME_ACTION_NEXT:
        return "actionNext";
    case EditorInfo.IME_ACTION_DONE:
        return "actionDone";
    case EditorInfo.IME_ACTION_PREVIOUS:
        return "actionPrevious";
    default:
        return "actionUnknown(" + actionId + ")";
    }
}
 
开发者ID:rkkr,项目名称:simple-keyboard,代码行数:23,代码来源:EditorInfoCompatUtils.java

示例2: setReturnKeyType

@WXComponentProp(name = Constants.Name.RETURN_KEY_TYPE)
public void setReturnKeyType(String type) {
  if (getHostView() == null) {
    return;
  }
  mReturnKeyType = type;
  switch (type) {
    case ReturnTypes.DEFAULT:
      mEditorAction = EditorInfo.IME_ACTION_UNSPECIFIED;
      break;
    case ReturnTypes.GO:
      mEditorAction = EditorInfo.IME_ACTION_GO;
      break;
    case ReturnTypes.NEXT:
      mEditorAction = EditorInfo.IME_ACTION_NEXT;
      break;
    case ReturnTypes.SEARCH:
      mEditorAction = EditorInfo.IME_ACTION_SEARCH;
      break;
    case ReturnTypes.SEND:
      mEditorAction = EditorInfo.IME_ACTION_SEND;
      break;
    case ReturnTypes.DONE:
      mEditorAction = EditorInfo.IME_ACTION_DONE;
      break;
    default:
      break;
  }

  //remove focus and hide keyboard first, the ImeOptions will take effect when show keyboard next time
  blur();
  getHostView().setImeOptions(mEditorAction);
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:33,代码来源:AbstractEditComponent.java


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