Updating page indicator content description to indicate click target

for apps list

Bug: 29777235
Change-Id: Ia3dc20db7ec06455429389de5752b9bcfff15555
This commit is contained in:
Sunny Goyal committed 2016-07-08 08:49:34 -07:00
1 parent e49a97aba0
commit 53fe1f26d3
3 files changed
+12 -3

No files matched your search

+6 -2
View File
@@ -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());