Further refinement of all apps / widgets transition

Change-Id: Id107a9aff74f014c07f8cbea6e74951a02dbddab
This commit is contained in:
Adam Cohen
2014-08-12 09:23:13 -07:00
parent 0fc1be164e
commit 63f1ec00fb
10 changed files with 155 additions and 57 deletions
@@ -1003,8 +1003,8 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
Drawable bg = getContext().getResources().getDrawable(R.drawable.quantum_panel);
if (bg != null) {
bg.setAlpha(mPageBackgroundsVisible ? 255: 0);
layout.setBackground(bg);
bg.setVisible(mPageBackgroundsVisible, false);
}
setVisibilityOnChildren(layout, View.VISIBLE);
@@ -1016,7 +1016,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
for (int i = 0; i < childCount; ++i) {
Drawable bg = getChildAt(i).getBackground();
if (bg != null) {
bg.setVisible(visible, false);
bg.setAlpha(visible ? 255 : 0);
}
}
}
@@ -1163,7 +1163,12 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
// immediately after syncing, we don't have a proper width.
int widthSpec = MeasureSpec.makeMeasureSpec(mContentWidth, MeasureSpec.AT_MOST);
int heightSpec = MeasureSpec.makeMeasureSpec(mContentHeight, MeasureSpec.AT_MOST);
layout.setBackground(getContext().getResources().getDrawable(R.drawable.quantum_panel_dark));
Drawable bg = getContext().getResources().getDrawable(R.drawable.quantum_panel_dark);
if (bg != null) {
bg.setAlpha(mPageBackgroundsVisible ? 255 : 0);
layout.setBackground(bg);
}
layout.measure(widthSpec, heightSpec);
}