Fixing unnecessary padding added to pages in overview mode
Change-Id: Icd17c2956b201ea0b6c6a2a495f567f51987b1ac
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user