I need to implement onItemLongPressListener as well as onTouchListener.They don't work together so I have to return false from ontouch listner in other for item long press listener to get triggered as well.
I need the image button to change when I touch the imageButton but since my on touch listener is returning false the image stays on the pressed down state.
How can I make it change the button image when I am no longer touching the button?
imageView.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
imageView.setImageResource(mThumbIdsPressed[position]);
} else {
imageView.setImageResource(mThumbIds[position]);
}
recordAudio.startPlaying(position);
return false;
}
});