You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DefaultTimeBar has a setListener method, but no addListener. It is impossible to add listeners without overwriting the default listener behaviour. It would be very nice to be able to just add one more listener to have one's own logic executed in addition to the default.
I believe the only changes needed in the code, are something like
private List<OnScrubListener> listeners = new ArrayList<OnScrubListener>();
public boolean addListener(OnScrubListener listener) {
return listeners.add(listener);
}
public boolean removeListener(OnScrubListener listener) {
return listeners.remove(listener);
}
... and then on each use of the listener, where today the code simply checks for null, one could replace the if-null-check with a for-loop, thus (example taken from onTouchEvent():
for (OnScrubListener listener : listeners) {
listener.onScrubMove(this, scrubPosition);
}
The text was updated successfully, but these errors were encountered:
Issue description
DefaultTimeBar has a
setListener
method, but noaddListener
. It is impossible to add listeners without overwriting the default listener behaviour. It would be very nice to be able to just add one more listener to have one's own logic executed in addition to the default.I believe the only changes needed in the code, are something like
... and then on each use of the listener, where today the code simply checks for null, one could replace the if-null-check with a for-loop, thus (example taken from
onTouchEvent()
:The text was updated successfully, but these errors were encountered: