本文整理汇总了Java中android.view.inputmethod.EditorInfo.IME_NULL属性的典型用法代码示例。如果您正苦于以下问题:Java EditorInfo.IME_NULL属性的具体用法?Java EditorInfo.IME_NULL怎么用?Java EditorInfo.IME_NULL使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.view.inputmethod.EditorInfo
的用法示例。
在下文中一共展示了EditorInfo.IME_NULL属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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;
}
示例3: onEditorAction
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
// If the action is a key-up event on the return key, send the message
if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
String message = view.getText().toString();
sendMessage(message);
}
return true;
}
示例4: onEditorAction
public boolean onEditorAction(TextView view, int actionId, KeyEvent event) {
// If the action is a key-up event on the return key, send the message
if (actionId == EditorInfo.IME_NULL && event.getAction() == KeyEvent.ACTION_UP) {
String message = view.getText().toString();
sendMessage(message);
}
if(D) Log.i(TAG, "END onEditorAction");
return true;
}
示例5: getTextViewSignInListener
private TextView.OnEditorActionListener getTextViewSignInListener() {
return new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
if (id == EditorInfo.IME_ACTION_DONE || id == EditorInfo.IME_NULL) {
attemptLogin();
return true;
}
return false;
}
};
}
示例6: 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;
}
示例7: 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;
}
示例8: onEditorAction
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == getResources().getInteger(R.integer.ime_action_id_next)
|| actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_NULL) {
onNextClicked();
// 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;
}
示例9: onCreate
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.manPages = initPages();
ArrayAdapter<Page> manPagesAdapter = new ArrayAdapter<Page>(this,
android.R.layout.simple_list_item_1, manPages);
ArrayAdapter<Page> manPagesCompleteAdapter = new ArrayAdapter<Page>(
this, android.R.layout.simple_dropdown_item_1line, manPages);
// Main list of all manpages
ListView manPagesView = (ListView) findViewById(R.id.pages_names);
manPagesView.setAdapter(manPagesAdapter);
manPagesView.setOnItemClickListener(new OnManpageClickListener(this));
// List of manpages displayed in the text field suggestions
AutoCompleteTextView manPagesCompleteTextView = (AutoCompleteTextView) findViewById(R.id.search_input);
manPagesCompleteTextView.setAdapter(manPagesCompleteAdapter);
manPagesCompleteTextView
.setOnItemClickListener(new OnManpageClickListener(this));
// Check the availability of files on external storage
if (!checkPageFilesOnExternalStorage(null))
suggestDownload();
// Handle the Enter key in the TextView
// Get the input TextView
AutoCompleteTextView input = (AutoCompleteTextView) findViewById(R.id.search_input);
// Create a new handler for the Enter key ("Go" key here)
TextView.OnEditorActionListener enterKeyListener = new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId,
KeyEvent event) {
// If search key was hit, search for this manpage
if (actionId == EditorInfo.IME_ACTION_SEARCH
|| actionId == EditorInfo.IME_NULL) {
Page p = getManpageCalled(v.getText().toString());
if (p != null) {
// display it if found,
displayManpage(p);
} else {
// else display an error message
Toast.makeText(getApplicationContext(),
"This manpage does not exist...",
Toast.LENGTH_LONG).show();
}
}
return true;
}
};
input.setOnEditorActionListener(enterKeyListener);
}