summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Klaassen <justinklaassen@google.com>2015-06-08 23:53:27 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-08 23:53:27 +0000
commit3de504503de030e2befcc6983b74f0a9c0bbebee (patch)
treea7aa0a1b6839c47e2a9c1a729a469f2bd272d63c
parent13eec3fe1bb885e2741210bc63c4d13f1d9a0389 (diff)
parent3d7653e2ab78354de794f893fc8921d9f2a23226 (diff)
downloadandroid_packages_apps_ExactCalculator-3de504503de030e2befcc6983b74f0a9c0bbebee.tar.gz
android_packages_apps_ExactCalculator-3de504503de030e2befcc6983b74f0a9c0bbebee.tar.bz2
android_packages_apps_ExactCalculator-3de504503de030e2befcc6983b74f0a9c0bbebee.zip
am 3d7653e2: Prevent clicks through the visible pad
* commit '3d7653e2ab78354de794f893fc8921d9f2a23226': Prevent clicks through the visible pad
-rw-r--r--src/com/android/calculator2/CalculatorPadViewPager.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/calculator2/CalculatorPadViewPager.java b/src/com/android/calculator2/CalculatorPadViewPager.java
index c915f25..d4520c5 100644
--- a/src/com/android/calculator2/CalculatorPadViewPager.java
+++ b/src/com/android/calculator2/CalculatorPadViewPager.java
@@ -58,9 +58,13 @@ 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) ;
+ : IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);
}
}
};