Tweaking page indicators to support add page icon, remembering widget picker page (Bug 10787439)
Change-Id: Iab0b5676aa9c34a610b4b968940abc81c913c234
This commit is contained in:
1 parent
bb701aaa83
commit
7819a56217
6 files changed
+58
-22
No files matched your search
@@ -4221,10 +4221,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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user