I use Gallery to show photos.
And it can scroll to previous or next one by touch screen.
But I want to set a button to lock the gallery.
I use below code to implement it:
gallery.setEnabled(false);
But it still can scroll view by touch screen.
How can I arrive it?
override the onTouchListner for your gallery
gallery.setOnTouchListener(new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
return true;
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With