From e6ceaddb8f73f91b58e2b8553507fffa5f58c1cb Mon Sep 17 00:00:00 2001 From: Manuel Martin Date: Tue, 3 Sep 2019 22:37:45 +0200 Subject: [PATCH] Hide context buttons when the action is canceled (#1743) --- .../org/mozilla/vrbrowser/ui/adapters/BookmarkAdapter.java | 4 ++++ .../org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/BookmarkAdapter.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/BookmarkAdapter.java index 43b828851..41815821d 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/BookmarkAdapter.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/BookmarkAdapter.java @@ -140,6 +140,10 @@ public BookmarkViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int view case MotionEvent.ACTION_DOWN: binding.setIsHovered(true); return false; + + case MotionEvent.ACTION_CANCEL: + binding.setIsHovered(false); + return false; } return false; }); diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java index 50c2a5d2e..7dfaafe23 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/adapters/HistoryAdapter.java @@ -140,6 +140,10 @@ public HistoryItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int v case MotionEvent.ACTION_DOWN: binding.setIsHovered(true); return false; + + case MotionEvent.ACTION_CANCEL: + binding.setIsHovered(false); + return false; } return false; });