Fixing issue with customize page holographic previews not showing.
- Adding temporary workaround for bad holographic default widget previews. Change-Id: I261045beac3791111f928511435e17e320f2d4a7
This commit is contained in:
1 parent
a58f8bb194
commit
c3f9f4fcbd
2 files changed
+9
-13
No files matched your search
@@ -595,20 +595,14 @@ public abstract class PagedView extends ViewGroup {
|
||||
int rightScreen = 0;
|
||||
while (x <= mScrollX) {
|
||||
leftScreen++;
|
||||
x += pageWidth + mPageSpacing;
|
||||
// replace above line with this if you don't assume all pages have same width as 0th
|
||||
// page:
|
||||
// x += getScaledMeasuredWidth(getChildAt(leftScreen));
|
||||
x += getScaledMeasuredWidth(getChildAt(leftScreen)) + mPageSpacing;
|
||||
}
|
||||
rightScreen = leftScreen;
|
||||
while (x < mScrollX + screenWidth) {
|
||||
while (x < mScrollX + screenWidth && rightScreen < pageCount) {
|
||||
rightScreen++;
|
||||
x += pageWidth + mPageSpacing;
|
||||
// replace above line with this if you don't assume all pages have same width as 0th
|
||||
// page:
|
||||
//if (rightScreen < pageCount) {
|
||||
// x += getScaledMeasuredWidth(getChildAt(rightScreen));
|
||||
//}
|
||||
if (rightScreen < pageCount) {
|
||||
x += getScaledMeasuredWidth(getChildAt(rightScreen)) + mPageSpacing;
|
||||
}
|
||||
}
|
||||
rightScreen = Math.min(getChildCount() - 1, rightScreen);
|
||||
|
||||
|
||||
Reference in new issue
Block a user