Fixing unnecessary padding added to pages in overview mode

Change-Id: Icd17c2956b201ea0b6c6a2a495f567f51987b1ac
This commit is contained in:
Sunny Goyal
2015-05-20 13:40:27 -07:00
parent f72eb710af
commit a1fbd84b79
2 changed files with 10 additions and 2 deletions
@@ -241,6 +241,11 @@ public class FolderPagedView extends PagedView {
return page;
}
@Override
protected int getChildGap() {
return getPaddingLeft() + getPaddingRight();
}
public void setFixedSize(int width, int height) {
width -= (getPaddingLeft() + getPaddingRight());
height -= (getPaddingTop() + getPaddingBottom());
+5 -2
View File
@@ -909,8 +909,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
pageGap = getPaddingRight();
}
childLeft += childWidth + pageGap
+ (lp.isFullScreenPage ? 0 : (getPaddingLeft() + getPaddingRight()));
childLeft += childWidth + pageGap + getChildGap();
}
}
@@ -958,6 +957,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
}
}
protected int getChildGap() {
return 0;
}
private void updateMaxScrollX() {
int childCount = getChildCount();
if (childCount > 0) {