mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
Giving custom content full screen
Change-Id: Icd104fff8a1a315b795a60b812048a6218bf0e5a
This commit is contained in:
@@ -92,13 +92,15 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int count = getChildCount();
|
||||
|
||||
int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightSpecSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
setMeasuredDimension(widthSpecSize, heightSpecSize);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
View child = getChildAt(i);
|
||||
measureChild(child);
|
||||
}
|
||||
int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);
|
||||
int heightSpecSize = MeasureSpec.getSize(heightMeasureSpec);
|
||||
setMeasuredDimension(widthSpecSize, heightSpecSize);
|
||||
}
|
||||
|
||||
public void setupLp(CellLayout.LayoutParams lp) {
|
||||
@@ -115,8 +117,15 @@ public class ShortcutAndWidgetContainer extends ViewGroup {
|
||||
final int cellWidth = mCellWidth;
|
||||
final int cellHeight = mCellHeight;
|
||||
CellLayout.LayoutParams lp = (CellLayout.LayoutParams) child.getLayoutParams();
|
||||
|
||||
lp.setup(cellWidth, cellHeight, mWidthGap, mHeightGap, invertLayoutHorizontally(), mCountX);
|
||||
if (!lp.isFullscreen) {
|
||||
lp.setup(cellWidth, cellHeight, mWidthGap, mHeightGap, invertLayoutHorizontally(),
|
||||
mCountX);
|
||||
} else {
|
||||
lp.x = 0;
|
||||
lp.y = 0;
|
||||
lp.width = getMeasuredWidth();
|
||||
lp.height = getMeasuredHeight();
|
||||
}
|
||||
int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(lp.width, MeasureSpec.EXACTLY);
|
||||
int childheightMeasureSpec = MeasureSpec.makeMeasureSpec(lp.height,
|
||||
MeasureSpec.EXACTLY);
|
||||
|
||||
Reference in New Issue
Block a user