Skip to content

Commit

Permalink
Improve played song info text scrolling on touch
Browse files Browse the repository at this point in the history
Abort text scrolling also when a change has happened during the press
gesture between ACTION_DOWN and ACTION_UP.
This way, if You are holding the view to let the text scroll and then
You move the finger from the original position, the scroll will be
aborted

Signed-off-by: enricocid <enrico2588@gmail.com>
  • Loading branch information
enricocid committed Sep 17, 2018
1 parent bf00ee9 commit 46991c2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ private void setupPlayerInfoTouchBehaviour() {
return true;
});
mPlayerInfoView.setOnTouchListener((v, event) -> {
if (event.getAction() == MotionEvent.ACTION_UP) {
if (event.getAction() == MotionEvent.ACTION_UP || event.getAction() == MotionEvent.ACTION_OUTSIDE || event.getAction() == MotionEvent.ACTION_MOVE) {
if (sPlayerInfoLongPressed) {
mPlayingSong.setSelected(false);
mPlayingAlbum.setSelected(false);
Expand Down

0 comments on commit 46991c2

Please sign in to comment.