Skip to content

Instantly share code, notes, and snippets.

@meadhikari
Created September 26, 2014 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meadhikari/feb7e314aa15ecaf10b1 to your computer and use it in GitHub Desktop.
Save meadhikari/feb7e314aa15ecaf10b1 to your computer and use it in GitHub Desktop.
button.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if(event.getAction() == MotionEvent.ACTION_DOWN) {
increaseSize();
} else if (event.getAction() == MotionEvent.ACTION_UP) {
resetSize();
}
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment