From c87ea7594c721f518c64b42add54c274f0d728e6 Mon Sep 17 00:00:00 2001 From: Howard Date: Wed, 8 Jul 2020 12:47:27 +0100 Subject: [PATCH] Provide the access to processTouch - Will allow for the user to set their own touch listener with its own behaviour, while also maintaining the original functionality and not just overriding the original touch listener --- .../main/java/com/github/naz013/colorslider/ColorSlider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colorslider/src/main/java/com/github/naz013/colorslider/ColorSlider.java b/colorslider/src/main/java/com/github/naz013/colorslider/ColorSlider.java index a5adbc9..81d4d73 100644 --- a/colorslider/src/main/java/com/github/naz013/colorslider/ColorSlider.java +++ b/colorslider/src/main/java/com/github/naz013/colorslider/ColorSlider.java @@ -325,7 +325,7 @@ private void calculateColors(@ColorInt int fromColor, @ColorInt int toColor, int } } - private boolean processTouch(MotionEvent event) { + public boolean processTouch(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) return true; else if (event.getAction() == MotionEvent.ACTION_MOVE || event.getAction() == MotionEvent.ACTION_UP) { updateView(event.getX(), event.getY());