1 button.setOnTouchListener(new View.OnTouchListener() {
2 @Override
3 public boolean onTouch(View view, MotionEvent motionEvent) {
4 if(button.isPressed()) {
5 upass.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD);
6 return true;
7 }
8 return true;
9 }
10 });