Merge "Optimize layout rendering in layoutlib [DO NOT MERGE]" into jb-mr2-dev

This commit is contained in:
Deepanshu Gupta
2014-04-16 18:33:10 +00:00
committed by Android (Google) Code Review

View File

@@ -335,7 +335,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
backgroundView = backgroundLayout;
backgroundLayout.setOrientation(LinearLayout.VERTICAL);
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
LayoutParams.MATCH_PARENT, 0);
layoutParams.weight = 1;
backgroundLayout.setLayoutParams(layoutParams);
topLayout.addView(backgroundLayout);
@@ -370,7 +370,7 @@ public class RenderSessionImpl extends RenderAction<SessionParams> {
// content frame
mContentRoot = new FrameLayout(context);
layoutParams = new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
LayoutParams.MATCH_PARENT, 0);
layoutParams.weight = 1;
mContentRoot.setLayoutParams(layoutParams);
backgroundLayout.addView(mContentRoot);