SHARE
TWEET

Untitled

a guest Jun 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ed es el EditText en cuestión
  2. // l es el layout que tengo encima del EditText
  3. final Context c = getContext();
  4. final InputMethodManager imm = (InputMethodManager) c.getSystemService(c.INPUT_METHOD_SERVICE);
  5.  
  6. l.setOnTouchListener(new View.OnTouchListener() {
  7.     @Override
  8.     public boolean onTouch(View v, MotionEvent e) {
  9.         imm.showSoftInput(ed, InputMethodManager.SHOW_IMPLICIT);
  10.         ed.setFocusableInTouchMode(true);
  11.         ed.requestFocus();
  12.  
  13.         return true;
  14.     }
  15. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top