2011-05-10 7 views

Répondre

0

Je pense que c'est ce que vous cherchez,

EditText editText = (EditText) findViewById(R.id.myEdit); 
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
mgr.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT); 

Et pour le fermer à nouveau:

InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); 
mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0); 

Rappelez-vous, le clavier logiciel affichera uniquement sur les appareils qui ne sont pas clavier physique.

+0

merci James, cependant, j'essaie de déclencher cet événement à partir du TextView. C'est possible? – emet

Questions connexes