From 46991c264ad9ab243f9531988e5baf70a0868939 Mon Sep 17 00:00:00 2001 From: enricocid Date: Mon, 17 Sep 2018 10:57:17 +0200 Subject: [PATCH] Improve played song info text scrolling on touch 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 --- .../app/src/main/java/com/iven/musicplayergo/MainActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/app/src/main/java/com/iven/musicplayergo/MainActivity.java b/project/app/src/main/java/com/iven/musicplayergo/MainActivity.java index b49d91780..cbefa3d85 100644 --- a/project/app/src/main/java/com/iven/musicplayergo/MainActivity.java +++ b/project/app/src/main/java/com/iven/musicplayergo/MainActivity.java @@ -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);