Setting min width of content in customize tray automatically
Change-Id: Idb307dcf21422472ef098702c1bc12e99f138228
This commit is contained in:
1 parent
12ac0d60cc
commit
d82b5817d4
4 files changed
+7
-8
No files matched your search
@@ -247,9 +247,12 @@ public class PagedViewCellLayout extends ViewGroup implements Page {
|
||||
// Return the distance from the left edge of the content of the leftmost icon to
|
||||
// the right edge of the content of the rightmost icon
|
||||
|
||||
// icons are centered within cells, find out how much offset that accounts for
|
||||
int iconHorizontalOffset = (mCellWidth - Utilities.getIconContentSize());
|
||||
return mCellCountX * mCellWidth + (mCellCountX - 1) * mWidthGap - iconHorizontalOffset;
|
||||
// icons are centered within cells, find out how much padding that accounts for
|
||||
return getWidthBeforeFirstLayout() - (mCellWidth - Utilities.getIconContentSize());
|
||||
}
|
||||
|
||||
int getWidthBeforeFirstLayout() {
|
||||
return mCellCountX * mCellWidth + (mCellCountX - 1) * mWidthGap;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user