Is it possible to capture release of a button just as we capture click using onClickListener() and OnClick() ?
I want to increase size of a
You should set an OnTouchListener on your button.
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();
}
}
};