aboutsummaryrefslogtreecommitdiffstats
path: root/ide_common/src/com/android/ide
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2010-11-19 13:54:48 -0800
committerXavier Ducrohet <xav@android.com>2010-11-19 14:18:55 -0800
commit018f0ada85957d49db115b11dd630b2e94f9fdfb (patch)
tree7e173ccd58484bcf214e1ac803994a90bcd1cb92 /ide_common/src/com/android/ide
parentd59c1f5ad1dc6219fd901940a8c40f320dad5685 (diff)
downloadsdk-018f0ada85957d49db115b11dd630b2e94f9fdfb.zip
sdk-018f0ada85957d49db115b11dd630b2e94f9fdfb.tar.gz
sdk-018f0ada85957d49db115b11dd630b2e94f9fdfb.tar.bz2
ADT/Layoutlib: update API to control how layout expands.
Previous API was a single on/off to let the layouts expand at render time depending on how much space they needed. The new API can now control expansion is horizontal and/or vertical (or not at all) Basic implementation in the editor, with a manual detect of "ScrollView" as top element. We should make the ViewRule handle this somehow. Change-Id: Idc503bc0d1d3df98fbf01cc84625952ca55a8afb
Diffstat (limited to 'ide_common/src/com/android/ide')
-rw-r--r--ide_common/src/com/android/ide/common/layoutlib/LayoutBridgeWrapper.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/ide_common/src/com/android/ide/common/layoutlib/LayoutBridgeWrapper.java b/ide_common/src/com/android/ide/common/layoutlib/LayoutBridgeWrapper.java
index f4c99bd..e1b8241 100644
--- a/ide_common/src/com/android/ide/common/layoutlib/LayoutBridgeWrapper.java
+++ b/ide_common/src/com/android/ide/common/layoutlib/LayoutBridgeWrapper.java
@@ -24,6 +24,7 @@ import com.android.layoutlib.api.SceneParams;
import com.android.layoutlib.api.SceneResult;
import com.android.layoutlib.api.ViewInfo;
import com.android.layoutlib.api.ILayoutResult.ILayoutViewInfo;
+import com.android.layoutlib.api.SceneParams.RenderingMode;
import java.lang.reflect.Field;
import java.util.ArrayList;
@@ -82,7 +83,8 @@ class LayoutBridgeWrapper extends LayoutBridge {
// Final ILayoutBridge API added support for "render full height"
result = mBridge.computeLayout(
params.getLayoutDescription(), params.getProjectKey(),
- params.getScreenWidth(), params.getScreenHeight(), params.getRenderFullSize(),
+ params.getScreenWidth(), params.getScreenHeight(),
+ params.getRenderingMode() == RenderingMode.FULL_EXPAND ? true : false,
params.getDensity(), params.getXdpi(), params.getYdpi(),
params.getThemeName(), params.getIsProjectTheme(),
params.getProjectResources(), params.getFrameworkResources(),