diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2016-07-08 08:47:07 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2016-07-08 08:49:34 -0700 |
commit | 53fe1f26d3103ab3306c421e0ddf299764620c32 (patch) | |
tree | 5c1d8af814eede8030bf97edb1d622b5d27bfacf /src/com/android/launcher3 | |
parent | e49a97aba08ac5a5a3de2c09cc2ae027a13f7d75 (diff) | |
download | android_packages_apps_Trebuchet-53fe1f26d3103ab3306c421e0ddf299764620c32.tar.gz android_packages_apps_Trebuchet-53fe1f26d3103ab3306c421e0ddf299764620c32.tar.bz2 android_packages_apps_Trebuchet-53fe1f26d3103ab3306c421e0ddf299764620c32.zip |
Updating page indicator content description to indicate click target
for apps list
Bug: 29777235
Change-Id: Ia3dc20db7ec06455429389de5752b9bcfff15555
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/PagedView.java | 8 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/com/android/launcher3/PagedView.java b/src/com/android/launcher3/PagedView.java index 2d3e8dd04..a37fe5bc2 100644 --- a/src/com/android/launcher3/PagedView.java +++ b/src/com/android/launcher3/PagedView.java @@ -251,7 +251,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc if (mPageIndicatorViewId > -1) { mPageIndicator = (PageIndicator) parent.findViewById(mPageIndicatorViewId); mPageIndicator.setMarkersCount(getChildCount()); - mPageIndicator.setContentDescription(getCurrentPageDescription()); + mPageIndicator.setContentDescription(getPageIndicatorDescription()); } } @@ -442,7 +442,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc private void updatePageIndicator() { // Update the page indicator (when we aren't reordering) if (mPageIndicator != null) { - mPageIndicator.setContentDescription(getCurrentPageDescription()); + mPageIndicator.setContentDescription(getPageIndicatorDescription()); if (!isReordering(false)) { mPageIndicator.setActiveMarker(getNextPage()); } @@ -2276,6 +2276,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc return false; } + protected String getPageIndicatorDescription() { + return getCurrentPageDescription(); + } + protected String getCurrentPageDescription() { return getContext().getString(R.string.default_scroll_format, getNextPage() + 1, getChildCount()); diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index dd5449572..6623367d1 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -4410,6 +4410,11 @@ public class Workspace extends PagedView } @Override + protected String getPageIndicatorDescription() { + return getResources().getString(R.string.all_apps_button_label); + } + + @Override protected String getCurrentPageDescription() { if (hasCustomContent() && getNextPage() == 0) { return mCustomContentDescription; |