Skip to content

Instantly share code, notes, and snippets.

@catehstn
Last active January 21, 2016 03:31
Show Gist options
  • Save catehstn/4a652553aca249319c84 to your computer and use it in GitHub Desktop.
Save catehstn/4a652553aca249319c84 to your computer and use it in GitHub Desktop.
imageView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View view, MotionEvent event) {
originalImageView.setVisibility(event.getAction() == MotionEvent.ACTION_DOWN ?
View.VISIBLE : View.GONE);
return true;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment