當前位置: 首頁>>代碼示例>>Java>>正文


Java EditorInfo.IME_NULL屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:16,代碼來源:PassphrasePromptActivity.java

示例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;
}
 
開發者ID:IdeaTrackerPlus,項目名稱:IdeaTrackerPlus,代碼行數:26,代碼來源:MainActivity.java

示例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;
}
 
開發者ID:hardik-dadhich,項目名稱:bluetooth-chat-appliction,代碼行數:8,代碼來源:BluetoothChatFragment.java

示例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;
}
 
開發者ID:sdrausty,項目名稱:buildAPKsApps,代碼行數:9,代碼來源:BluetoothChat.java

示例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;
        }
    };
}
 
開發者ID:wulkanowy,項目名稱:wulkanowy,代碼行數:12,代碼來源:LoginActivity.java

示例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;
}
 
開發者ID:IdeaTrackerPlus,項目名稱:IdeaTrackerPlus,代碼行數:12,代碼來源:RecyclerOnClickListener.java

示例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;
}
 
開發者ID:TryGhost,項目名稱:Ghost-Android,代碼行數:11,代碼來源:PasswordAuthFragment.java

示例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;
}
 
開發者ID:TryGhost,項目名稱:Ghost-Android,代碼行數:11,代碼來源:LoginUrlFragment.java

示例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);
}
 
開發者ID:sdrausty,項目名稱:buildAPKsApps,代碼行數:54,代碼來源:ManualActivity.java


注:本文中的android.view.inputmethod.EditorInfo.IME_NULL屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。