summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutAndWidgetContainer.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2013-07-23 15:52:40 -0700
committerAdam Cohen <adamcohen@google.com>2013-07-23 17:47:54 -0700
commitec40b2b90c649be3b513af2ba174db56b54b64f6 (patch)
treea301036354cd36d37d09016a5d5a92c11c52fdae /src/com/android/launcher3/ShortcutAndWidgetContainer.java
parentbffe745b1e195deedc1dcc60f37950b3b0b4c652 (diff)
downloadandroid_packages_apps_Trebuchet-ec40b2b90c649be3b513af2ba174db56b54b64f6.tar.gz
android_packages_apps_Trebuchet-ec40b2b90c649be3b513af2ba174db56b54b64f6.tar.bz2
android_packages_apps_Trebuchet-ec40b2b90c649be3b513af2ba174db56b54b64f6.zip
Giving custom content full screen
Change-Id: Icd104fff8a1a315b795a60b812048a6218bf0e5a
Diffstat (limited to 'src/com/android/launcher3/ShortcutAndWidgetContainer.java')
-rw-r--r--src/com/android/launcher3/ShortcutAndWidgetContainer.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
index 18b9399d1..64a87ef07 100644
--- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java
+++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java
@@ -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);