Make play/pause button long-clickable.

This commit is contained in:
Alex Hart 2021-11-08 09:12:03 -04:00
parent 0e8550748d
commit a6dfee16e9
2 changed files with 5 additions and 0 deletions

View file

@ -119,6 +119,7 @@ public final class AudioView extends FrameLayout {
lottieDirection = REVERSE;
this.playPauseButton.setOnClickListener(new PlayPauseClickedListener());
this.playPauseButton.setOnLongClickListener(v -> performLongClick());
this.seekBar.setOnSeekBarChangeListener(new SeekBarModifiedListener());
setTint(typedArray.getColor(R.styleable.AudioView_foregroundTintColor, Color.WHITE));

View file

@ -329,6 +329,10 @@ public final class ConversationItem extends RelativeLayout implements BindableCo
setMessageSpacing(context, messageRecord, previousMessageRecord, nextMessageRecord, groupThread);
setReactions(messageRecord);
setFooter(messageRecord, nextMessageRecord, locale, groupThread, hasWallpaper);
if (audioViewStub.resolved()) {
audioViewStub.get().setOnLongClickListener(passthroughClickListener);
}
}
@Override