Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d7653e2 authored by Justin Klaassen's avatar Justin Klaassen
Browse files

Prevent clicks through the visible pad

Bug: 21706513
Change-Id: I4646cd1d9a2d67e6e8241ecbb5b960b440c458d2
parent 41c66a9e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -58,7 +58,11 @@ public class CalculatorPadViewPager extends ViewPager {
        @Override
        public void onPageSelected(int position) {
            for (int i = getChildCount() - 1; i >= 0; --i) {
                getChildAt(i).setImportantForAccessibility(i == position
                final View child = getChildAt(i);
                // Prevent clicks and accessibility focus from going through to descendants of
                // other pages which are covered by the current page.
                child.setClickable(i == position);
                child.setImportantForAccessibility(i == position
                        ? IMPORTANT_FOR_ACCESSIBILITY_AUTO
                        : IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
            }