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


Java EditorInfo.IME_ACTION_DONE属性代码示例

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


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

示例1: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    logi("onEditorAction() :: currentEditableRow=" + currentEditableRow);

    int pos = (int) v.getTag(R.id.positionId);
    Project project = mProjects.get(pos);
    project.inEditMode = false;
    currentEditableRow = -1;

    if(actionId == EditorInfo.IME_ACTION_DONE) {
        dismissKeyBoard(v, true, true);
    } else if(actionId == -1) {
        dismissKeyBoard(v, true, false);
    }

    return true;
}
 
开发者ID:Samsung,项目名称:microbit,代码行数:17,代码来源:ProjectAdapter.java

示例2: 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:sergeychilingaryan,项目名称:AOSP-Kayboard-7.1.2,代码行数:23,代码来源:EditorInfoCompatUtils.java

示例3: onEditorAction

@Override
public boolean onEditorAction(TextView exampleView, int actionId, KeyEvent keyEvent) {
  if ((keyEvent == null && actionId == EditorInfo.IME_ACTION_DONE) ||
      (keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_DOWN &&
          (actionId == EditorInfo.IME_NULL)))
  {
    handlePassphrase();
    return true;
  } else if (keyEvent != null && keyEvent.getAction() == KeyEvent.ACTION_UP &&
             actionId == EditorInfo.IME_NULL)
  {
    return true;
  }

  return false;
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:16,代码来源:PassphrasePromptActivity.java

示例4: 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) {

        switch ((int) v.getTag()) {
            case 1:
                mNoteField.requestFocus();
                break;

            case 2:
                sendIdeaFromDialog();
                break;

            default:
                break;
        }
        return true;
    }
    return false;
}
 
开发者ID:IdeaTrackerPlus,项目名称:IdeaTrackerPlus,代码行数:26,代码来源:MainActivity.java

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

示例6: onStrokeWidthEditorAction

@OnEditorAction(R.id.edittext_stroke_width) boolean onStrokeWidthEditorAction(
        TextView textView,
        int actionId,
        KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_DONE) {
        mRoundedFrameLayout.setBackgroundDetails(null,
                (int)getDimensionFromEditText(textView),
                null,
                null);
        return true;
    }
    return false;
}
 
开发者ID:Seanalair,项目名称:RoundedCornerFrameLayout,代码行数:13,代码来源:MainActivity.java

示例7: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (EditorInfo.IME_ACTION_DONE == actionId) {
        // Return input text to activity
        doOK();
        this.dismiss();
        return true;
    }
    return false;
}
 
开发者ID:victordiaz,项目名称:phonk,代码行数:10,代码来源:NewProjectDialogFragment.java

示例8: onEditorAction

@OnEditorAction(R.id.new_task_input)
boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    LogUtils.d("actionId: " + actionId + ", event Action: " + event);
    if (actionId == EditorInfo.IME_ACTION_DONE) {
        presenter.addNewTask(newTaskInput.getText().toString());
        return true;
    }
    return false;
}
 
开发者ID:mengdd,项目名称:TodoRealm,代码行数:9,代码来源:ListDetailFragment.java

示例9: onEditorAction

@OnEditorAction(R.id.task_detail_note)
boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_DONE) {
        KeyboardUtils.hideKeyboard(view.getContext(), view);
        view.clearFocus();
        presenter.onNoteEditorActionDone(view.getText().toString());
        return true;
    }
    return false;
}
 
开发者ID:mengdd,项目名称:TodoRealm,代码行数:10,代码来源:TaskDetailFragment.java

示例10: onCreateInputConnection

@Override
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {

    outAttrs.inputType = InputType.TYPE_CLASS_NUMBER;
    outAttrs.imeOptions = EditorInfo.IME_ACTION_DONE;
    outAttrs.initialSelStart = 0;

    return editCodeInputConnection;
}
 
开发者ID:Onum,项目名称:EditCodeView,代码行数:9,代码来源:EditCodeView.java

示例11: 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) {
        sendEditIdea();
    }
    return true;
}
 
开发者ID:IdeaTrackerPlus,项目名称:IdeaTrackerPlus,代码行数:12,代码来源:RecyclerOnClickListener.java

示例12: onEditorAction

@Override
public boolean onEditorAction(final TextView v, final int actionId, final KeyEvent event) {
    if (EditorInfo.IME_ACTION_DONE == actionId) {
        returnData();
        return true;
    }
    return false;
}
 
开发者ID:ujjwalagrawal17,项目名称:CodeCompilerApp,代码行数:8,代码来源:EditTextDialog.java

示例13: onEditorAction

@Override
public void onEditorAction(int actionId) {
    int result = actionId & EditorInfo.IME_MASK_ACTION;
    if (result == EditorInfo.IME_ACTION_DONE ||
            result == EditorInfo.IME_ACTION_SEARCH) {
        hideKeyboard();
    }
}
 
开发者ID:sqrt1764,项目名称:AndroidSoftKeyboardListener,代码行数:8,代码来源:SoftKeyboardListener.java

示例14: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == EditorInfo.IME_ACTION_DONE) {
        searchAction();
        InputMethodManager imm = (InputMethodManager)v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(v.getWindowToken(), 0);
        return true;
    }
    return false;
}
 
开发者ID:htqqdd,项目名称:music_player,代码行数:10,代码来源:DownloadFragment.java

示例15: onEditorAction

@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
    if (actionId == getResources().getInteger(R.integer.ime_action_id_signin)
            || actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL) {
        onSignInClicked();
        // don't consume the event, so the keyboard can also be hidden
        // http://stackoverflow.com/questions/2342620/how-to-hide-keyboard-after-typing-in-edittext-in-android#comment20849208_10184099
        return false;
    }
    return false;
}
 
开发者ID:TryGhost,项目名称:Ghost-Android,代码行数:11,代码来源:PasswordAuthFragment.java


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