Search in sources :

Example 81 with InputMethodManager

use of android.view.inputmethod.InputMethodManager in project SmartAndroidSource by jaychou2012.

the class SmartFragmentActivity method hideSoftKeyboard.

public void hideSoftKeyboard(View view) {
    if (view != null) {
        InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
    }
}
Also used : InputMethodManager(android.view.inputmethod.InputMethodManager)

Example 82 with InputMethodManager

use of android.view.inputmethod.InputMethodManager in project SmartAndroidSource by jaychou2012.

the class AssistTool method hideSoftKeyboard.

public void hideSoftKeyboard(View view) {
    if (view != null) {
        InputMethodManager imm = (InputMethodManager) c.getSystemService(c.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
    }
}
Also used : InputMethodManager(android.view.inputmethod.InputMethodManager)

Example 83 with InputMethodManager

use of android.view.inputmethod.InputMethodManager in project musicbrainz-android by jdamcd.

the class LoginFragment method tryLogin.

private void tryLogin() {
    if (isFieldsPopulated()) {
        InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
        imm.hideSoftInputFromWindow(passwordField.getWindowToken(), 0);
        startLogin();
    } else {
        Toast.makeText(context, R.string.toast_auth_err, Toast.LENGTH_SHORT).show();
    }
}
Also used : InputMethodManager(android.view.inputmethod.InputMethodManager)

Example 84 with InputMethodManager

use of android.view.inputmethod.InputMethodManager in project musicbrainz-android by jdamcd.

the class BarcodeSearchFragment method hideKeyboard.

private void hideKeyboard() {
    InputMethodManager imm = (InputMethodManager) App.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(searchBox.getWindowToken(), 0);
}
Also used : InputMethodManager(android.view.inputmethod.InputMethodManager)

Example 85 with InputMethodManager

use of android.view.inputmethod.InputMethodManager in project Android-Terminal-Emulator by jackpal.

the class Term method doToggleSoftKeyboard.

private void doToggleSoftKeyboard() {
    InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
}
Also used : InputMethodManager(android.view.inputmethod.InputMethodManager)

Aggregations

InputMethodManager (android.view.inputmethod.InputMethodManager)631 View (android.view.View)120 TextView (android.widget.TextView)67 Paint (android.graphics.Paint)43 Spannable (android.text.Spannable)34 Editable (android.text.Editable)33 EditText (android.widget.EditText)33 ImageView (android.widget.ImageView)31 Intent (android.content.Intent)29 RemoteException (android.os.RemoteException)23 KeyEvent (android.view.KeyEvent)22 TextPaint (android.text.TextPaint)21 Point (android.graphics.Point)18 InputMethodInfo (android.view.inputmethod.InputMethodInfo)18 AdapterView (android.widget.AdapterView)18 Button (android.widget.Button)16 RemoteView (android.widget.RemoteViews.RemoteView)16 Resources (android.content.res.Resources)15 ListView (android.widget.ListView)15 InputMethodSubtype (android.view.inputmethod.InputMethodSubtype)14