In android, is it possible for me to register a long click listener on a seekbar?
I have done this:
mySeekBar.setLongClickable(true);
mySeekBar.setOnLongClickListener(new OnLongClickListener() {
public boolean onLongClick (View v) {
Log.d("TEST", "Get a long click event!!!!!!!!!!!!");
}
});
But I don’t see my debug print statement at all. Any idea about how can I achieve it?
Thank you.
AFAICT this is not possible to do with the
OnLongClickListener. The documentation doesn’t say it won’t work, but I’ve never seen any example of this (and I never got it to work myself either).A possible workaround (depending on what you want to achieve) could be to use the
OnSeekBarChangeListenerhandling the long click throughonStartTrackingTouch/onStopTrackingTouchcallbacks.