ImageView imageView = (ImageView) view.findViewById(R.id.imageView);
imageView.setOnTouchListener(new View.OnTouchListener {
public onTouch(View v, MotionEvent event){
if (event.getAction() == MotionEvent.ACTION_DOWN)
{
//set edittext to normal
}
else if (event.getAction() == MotionEvent.ACTION_UP
{
// set edittext to password
}
return true;
}
});
The above code should work, it might need a little tweaking - I can't test it at the moment. Should give you a good idea on how to handle it.