Merge "Tweaking page indicators to support add page icon, remembering widget picker page (Bug 10787439)" into jb-ub-now-indigo-rose

This commit is contained in:
Winson Chung
2013-09-20 17:53:54 +00:00
committed by Android (Google) Code Review
6 changed files with 58 additions and 22 deletions
+9 -3
View File
@@ -4225,10 +4225,16 @@ public class Workspace extends SmoothPagedView
}
@Override
protected int getPageIndicatorMarker(int pageIndex) {
if (getScreenIdForPageIndex(pageIndex) == CUSTOM_CONTENT_SCREEN_ID) {
return R.layout.custom_content_page_indicator_marker;
protected PageIndicator.PageMarkerResources getPageIndicatorMarker(int pageIndex) {
long screenId = getScreenIdForPageIndex(pageIndex);
if (screenId == EXTRA_EMPTY_SCREEN_ID) {
int count = mScreenOrder.size() - (hasCustomContent() ? 1 : 0);
if (count > 1) {
return new PageIndicator.PageMarkerResources(R.drawable.ic_pageindicator_add,
R.drawable.ic_pageindicator_add);
}
}
return super.getPageIndicatorMarker(pageIndex);
}