]> git.ktnx.net Git - mobile-ledger.git/commitdiff
HueRing: override/call performClick()
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 12:04:50 +0000 (12:04 +0000)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Sat, 15 Aug 2020 12:48:13 +0000 (12:48 +0000)
linter insists this would help accessibility

app/src/main/java/net/ktnx/mobileledger/ui/HueRing.java

index 435c8c6d3c0b2244efdebea7a6817b32525d1551..6e52dcff8b1794bb7a37190de41613fe4a11c62b 100644 (file)
@@ -207,6 +207,10 @@ public class HueRing extends View {
         centerRect.set(-centerR, -centerR, centerR, centerR);
     }
     @Override
+    public boolean performClick() {
+        return super.performClick();
+    }
+    @Override
     public boolean onTouchEvent(MotionEvent event) {
         switch (event.getAction()) {
             case MotionEvent.ACTION_DOWN:
@@ -233,8 +237,10 @@ public class HueRing extends View {
                         hue));
                 setHue(hue);
                 break;
+            case MotionEvent.ACTION_UP:
+                performClick();
+                break;
         }
-
         return true;
     }
     public void setInitialHue(int initialHue) {