List of usage examples for android.view.inputmethod InputMethodManager SHOW_IMPLICIT
int SHOW_IMPLICIT
To view the source code for android.view.inputmethod InputMethodManager SHOW_IMPLICIT.
Click Source Link
From source file:com.docd.purefm.ui.activities.SearchActivity.java
@Override protected void onStart() { super.onStart(); if (mAdapter.isEmpty() && mInput.requestFocus()) { mInputMethodManager.showSoftInput(mInput, InputMethodManager.SHOW_IMPLICIT); getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE); }/*from w w w .jav a 2 s . c o m*/ }
From source file:org.videolan.vlc.gui.SearchFragment.java
@Override public void onResume() { super.onResume(); mSearchText.requestFocus();// w w w . ja va 2s .c om InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(mSearchText, InputMethodManager.SHOW_IMPLICIT); showSearchHistory(); }
From source file:com.github.rutvijkumar.twittfuse.Util.java
public static void showSoftKeyboard(View view, Activity activity) { if (view.requestFocus()) { InputMethodManager imm = (InputMethodManager) activity.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT); }// ww w . j a v a 2s .c om }
From source file:com.liferay.alerts.activity.SignInActivity.java
protected void showKeyboard() { final InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); Runnable runnable = new Runnable() { @Override/* www. j av a 2s. c o m*/ public void run() { manager.showSoftInput(_server, InputMethodManager.SHOW_IMPLICIT); } }; int delay = getResources().getInteger(R.integer.compose_show_keyboard_delay); Handler handler = new Handler(); handler.postDelayed(runnable, delay); }
From source file:com.vikingbrain.dmt.view.RemoteControlActivity.java
/** * Show the keyboard./*from www . j a v a 2 s .c o m*/ */ private void showKeyboard() { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); if (imm != null) { imm.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0); isKeyboardShowing = true; } }
From source file:com.amazonaws.devicefarm.android.referenceapp.Fragments.LoginFragment.java
/** * Resets the view/*from www. ja va2 s . c o m*/ */ @OnClick(R.id.alt_button) public void altButtonPressed() { usernameInput.setText(""); passwordInput.setText(""); altView.setVisibility(View.GONE); mainView.setVisibility(View.VISIBLE); imm.showSoftInput(usernameInput, InputMethodManager.SHOW_IMPLICIT); }
From source file:info.xuluan.podcast.SearchActivity.java
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.search_activity); setTitle(getResources().getString(R.string.title_channels)); mAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, mStrings); setListAdapter(mAdapter);//from w ww . j ava 2 s . c om getListView().setOnCreateContextMenuListener(this); mEditText = (EditText) findViewById(R.id.keywords); mEditText.addTextChangedListener(this); startInit(); Button next = (Button) findViewById(R.id.ButtonNext); next.setEnabled(false); next.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { String str = "&start=" + mStart; String url = getUrl(); if (url != null) { start_search(url + str); } } }); ImageButton start = (ImageButton) findViewById(R.id.ButtonStart); start.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { InputMethodManager m = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); m.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, InputMethodManager.HIDE_NOT_ALWAYS); m.hideSoftInputFromInputMethod(mEditText.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); String str = "&start=" + mStart; String url = getUrl(); if (url != null) { start_search(url + str); } } }); TabsHelper.setChannelTabClickListeners(this, R.id.channel_bar_search_button); }
From source file:com.nicefontaine.seanachie.ui.form.FormFragment.java
private void initEditText() { editText.requestFocus();/*from w w w. ja v a2s. c o m*/ InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); imm.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); editText.setOnFocusChangeListener((v, hasFocus) -> { imm.hideSoftInputFromWindow(v.getWindowToken(), 0); }); }
From source file:org.catrobat.catroid.ui.dialogs.LoginRegisterDialog.java
@Override public Dialog onCreateDialog(Bundle bundle) { View rootView = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_login_register, null); usernameEditText = (EditText) rootView.findViewById(R.id.username); passwordEditText = (EditText) rootView.findViewById(R.id.password); termsOfUseLinkTextView = (TextView) rootView.findViewById(R.id.register_terms_link); String termsOfUseUrl = getString(R.string.about_link_template, Constants.CATROBAT_TERMS_OF_USE_URL, getString(R.string.register_pocketcode_terms_of_use_text)); termsOfUseLinkTextView.setMovementMethod(LinkMovementMethod.getInstance()); termsOfUseLinkTextView.setText(Html.fromHtml(termsOfUseUrl)); usernameEditText.setText(""); passwordEditText.setText(""); final AlertDialog loginRegisterDialog = new AlertDialog.Builder(getActivity()).setView(rootView) .setTitle(R.string.login_register_dialog_title).setPositiveButton(R.string.login_or_register, null) .setNeutralButton(R.string.password_forgotten, null).create(); loginRegisterDialog.setCanceledOnTouchOutside(true); loginRegisterDialog.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); loginRegisterDialog.setOnShowListener(new OnShowListener() { @Override/*from w w w .java 2 s .co m*/ public void onShow(DialogInterface dialog) { InputMethodManager inputManager = (InputMethodManager) getActivity() .getSystemService(Context.INPUT_METHOD_SERVICE); inputManager.showSoftInput(usernameEditText, InputMethodManager.SHOW_IMPLICIT); Button loginRegisterButton = loginRegisterDialog.getButton(AlertDialog.BUTTON_POSITIVE); loginRegisterButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { handleLoginRegisterButtonClick(); } }); Button passwordForgottenButton = loginRegisterDialog.getButton(AlertDialog.BUTTON_NEUTRAL); passwordForgottenButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { handlePasswordForgottenButtonClick(); } }); } }); return loginRegisterDialog; }
From source file:org.exoplatform.shareextension.ComposeFragment.java
public void setTouchListener() { // Open the soft keyboard and give focus to the edit text field when the // scroll view is tapped scroller.setOnTouchListener(new View.OnTouchListener() { @Override//from w w w.j av a2 s .co m public boolean onTouch(View v, MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { etPostMessage.requestFocus(); InputMethodManager mgr = (InputMethodManager) getActivity() .getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(etPostMessage, InputMethodManager.SHOW_IMPLICIT); } return v.performClick(); } }); }