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


Java EditorInfo.IME_ACTION_SEND属性代码示例

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


在下文中一共展示了EditorInfo.IME_ACTION_SEND属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: onEditorAction

@Override
public boolean onEditorAction(TextView arg0, int actionId, KeyEvent arg2) {
    // hide the keyboard and search the web when the enter key
    // button is pressed
    if (actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE
        || actionId == EditorInfo.IME_ACTION_NEXT
        || actionId == EditorInfo.IME_ACTION_SEND
        || actionId == EditorInfo.IME_ACTION_SEARCH
        || (arg2.getAction() == KeyEvent.KEYCODE_ENTER)) {
        InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
        searchTheWeb(mSearch.getText().toString());
        final LightningView currentView = mTabsManager.getCurrentTab();
        if (currentView != null) {
            currentView.requestFocus();
        }
        return true;
    }
    return false;
}
 
开发者ID:XndroidDev,项目名称:Xndroid,代码行数:20,代码来源:BrowserActivity.java

示例3: onEditorAction

@Override
public boolean onEditorAction(TextView arg0, int actionId, KeyEvent arg2) {
	// hide the keyboard and search the web when the enter key
	// button is pressed
	if (actionId == EditorInfo.IME_ACTION_GO || actionId == EditorInfo.IME_ACTION_DONE
			|| actionId == EditorInfo.IME_ACTION_NEXT
			|| actionId == EditorInfo.IME_ACTION_SEND
			|| actionId == EditorInfo.IME_ACTION_SEARCH
			|| (arg2.getAction() == KeyEvent.KEYCODE_ENTER)) {
		InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
		imm.hideSoftInputFromWindow(mSearch.getWindowToken(), 0);
		searchTheWeb(mSearch.getText().toString());
		LightningView v=getCurrentWebView();
		if (v != null) {
			v.requestFocus();
		}
		return true;
	}
	return false;
}
 
开发者ID:Louis19910615,项目名称:youkes_browser,代码行数:20,代码来源:BrowserActivity.java

示例4: handleAction

private void handleAction() {
    EditorInfo curEditor = getCurrentInputEditorInfo();
    switch (curEditor.imeOptions & EditorInfo.IME_MASK_ACTION) {
        case EditorInfo.IME_ACTION_DONE:
            getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_DONE);
            break;
        case EditorInfo.IME_ACTION_GO:
            getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_GO);
            break;
        case EditorInfo.IME_ACTION_NEXT:
            getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_NEXT);
            break;
        case EditorInfo.IME_ACTION_SEARCH:
            getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEARCH);
            break;
        case EditorInfo.IME_ACTION_SEND:

            getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEND);

            break;
        default:

            break;
    }
}
 
开发者ID:VladThodo,项目名称:behe-keyboard,代码行数:25,代码来源:PCKeyboard.java

示例5: setTransport

public void setTransport(TransportOption transport) {
  final boolean useSystemEmoji = TextSecurePreferences.isSystemEmojiPreferred(getContext());

  int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
  int inputType  = getInputType();

  if (isLandscape()) setImeActionLabel(transport.getComposeHint(), EditorInfo.IME_ACTION_SEND);
  else               setImeActionLabel(null, 0);

  if (useSystemEmoji) {
    inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
  }

  setInputType(inputType);
  setImeOptions(imeOptions);
  setHint(transport.getComposeHint(),
          transport.getSimName().isPresent()
              ? getContext().getString(R.string.conversation_activity__from_sim_name, transport.getSimName().get())
              : null);
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:20,代码来源:ComposeText.java

示例6: setImeOptions

void setImeOptions(Resources res, int options) {
    if (mEnterKey == null) {
        return;
    }

    switch (options&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {
        case EditorInfo.IME_ACTION_GO:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = res.getText(R.string.label_go_key);
            break;
        case EditorInfo.IME_ACTION_NEXT:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = res.getText(R.string.label_next_key);
            break;
        case EditorInfo.IME_ACTION_SEARCH:
            mEnterKey.icon = res.getDrawable(R.drawable.sym_keyboard_search);
            mEnterKey.label = null;
            break;
        case EditorInfo.IME_ACTION_SEND:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = res.getText(R.string.label_send_key);
            break;
        default:
            mEnterKey.icon = res.getDrawable(R.drawable.sym_keyboard_return);
            mEnterKey.label = null;
            break;
    }
}
 
开发者ID:YehtutHl,项目名称:myan,代码行数:31,代码来源:smKeyboard.java

示例7: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId==EditorInfo.IME_ACTION_SEND){
        sendMsg();
        etInput.setText("");
        return true;
    }else {

    }
    closeKeyBoard();
    return false;
}
 
开发者ID:guzhigang001,项目名称:QNewsDemo,代码行数:12,代码来源:RobotFragment.java

示例8: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
  if (actionId == EditorInfo.IME_ACTION_SEND) {
    sendButton.performClick();
    return true;
  }
  return false;
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:8,代码来源:ConversationActivity.java

示例9: onEditorAction

/** Send a text message when the done button is pressed on the keyboard.*/
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_SEND)
        if (messageSendListener!=null)
            messageSendListener.onSendPressed(getMessageText());

    return false;
}
 
开发者ID:MobileDev418,项目名称:AndroidBackendlessChat,代码行数:9,代码来源:ChatMessageBoxView.java

示例10: setImeOptions

/**
 * This looks at the ime options given by the current editor, to set the
 * appropriate label on the keyboard's enter key (if it has one).
 */
void setImeOptions(Resources res, int options) {
    if (mEnterKey == null) {
        return;
    }

    switch (options&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {
        case EditorInfo.IME_ACTION_GO:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = "ENT";
            break;
        case EditorInfo.IME_ACTION_NEXT:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = "N";
            break;
        case EditorInfo.IME_ACTION_SEARCH:
          //  mEnterKey.icon = "K";
            mEnterKey.label = null;
            break;
        case EditorInfo.IME_ACTION_SEND:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.label = "HH";
            break;
        default:
         //   mEnterKey.icon = "U";
            mEnterKey.label = null;
            break;
    }
}
 
开发者ID:VladThodo,项目名称:behe-keyboard,代码行数:35,代码来源:LatinKeyboard.java

示例11: 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

示例12: onEditorAction

@Override
public boolean onEditorAction(TextView textView, int actionId, KeyEvent keyEvent) {
    if (EditorInfo.IME_ACTION_SEND == actionId) {
        onPushAction();
        return true;
    }
    else
    if ( (EditorInfo.IME_ACTION_SEARCH == actionId ) && ( textView.getId() == R.id.et_contract_account) ){
        onContractEntered( mEtContract.getText().toString());
    }

    return false;
}
 
开发者ID:mithrilcoin-io,项目名称:EosCommander,代码行数:13,代码来源:PushFragment.java

示例13: setImeOptions

/**
 * This looks at the ime options given by the current editor, to set the
 * appropriate label on the keyboard's enter key (if it has one).
 */
void setImeOptions(Resources res, int options) {
    if (mEnterKey == null) {
        return;
    }

    int valnorm = KeyEvent.KEYCODE_ENTER;

    switch (options & (EditorInfo.IME_MASK_ACTION | EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {
        case EditorInfo.IME_ACTION_GO:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.codes = NORMAL_ENTER;
            mEnterKey.label = res.getText(R.string.label_go_key);
            break;
        case EditorInfo.IME_ACTION_NEXT:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.codes = NORMAL_ENTER;
            mEnterKey.label = res.getText(R.string.label_next_key);
            break;
        case EditorInfo.IME_ACTION_SEARCH:
            mEnterKey.icon = res.getDrawable(R.drawable.sym_keyboard_search);
            mEnterKey.codes = NORMAL_ENTER;
            mEnterKey.label = null;
            break;
        case EditorInfo.IME_ACTION_SEND:
            mEnterKey.iconPreview = null;
            mEnterKey.icon = null;
            mEnterKey.codes = NORMAL_ENTER;
            mEnterKey.label = res.getText(R.string.label_send_key);
            break;
        default:
            mEnterKey.icon = res.getDrawable(R.drawable.sym_keyboard_return);
            mEnterKey.label = null;
            mEnterKey.codes = TERMINAL_ENTER;
            break;
    }
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:42,代码来源:LatinKeyboard.java

示例14: updateImeOptions

private void updateImeOptions() {
  // Default to IME_ACTION_DONE
  int returnKeyFlag = EditorInfo.IME_ACTION_DONE;
  if (mReturnKeyType != null) {
    switch (mReturnKeyType) {
      case "go":
        returnKeyFlag = EditorInfo.IME_ACTION_GO;
        break;
      case "next":
        returnKeyFlag = EditorInfo.IME_ACTION_NEXT;
        break;
      case "none":
        returnKeyFlag = EditorInfo.IME_ACTION_NONE;
        break;
      case "previous":
        returnKeyFlag = EditorInfo.IME_ACTION_PREVIOUS;
        break;
      case "search":
        returnKeyFlag = EditorInfo.IME_ACTION_SEARCH;
        break;
      case "send":
        returnKeyFlag = EditorInfo.IME_ACTION_SEND;
        break;
      case "done":
        returnKeyFlag = EditorInfo.IME_ACTION_DONE;
        break;
    }
  }

  if (mDisableFullscreen) {
    setImeOptions(returnKeyFlag | EditorInfo.IME_FLAG_NO_FULLSCREEN);
  } else {
    setImeOptions(returnKeyFlag);
  }
}
 
开发者ID:qq565999484,项目名称:RNLearn_Project1,代码行数:35,代码来源:ReactEditText.java

示例15: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_GO
            || actionId == EditorInfo.IME_ACTION_DONE
            || actionId == EditorInfo.IME_ACTION_NEXT
            || actionId == EditorInfo.IME_ACTION_SEND
            || actionId == EditorInfo.IME_ACTION_SEARCH
            || actionId == EditorInfo.IME_NULL) {
        mNoteField.requestFocus();
    }
    return true;
}
 
开发者ID:IdeaTrackerPlus,项目名称:IdeaTrackerPlus,代码行数:12,代码来源:RecyclerOnClickListener.java


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