Hi,

The Android Layout Editor has been somewhat problematic for me when it
shows the layout of the widgets on the screen. Some of the widgets are
all shown crowded to the top. However, when showing the outline of the
widgets, the outlines are drawn in the correct spot.

However, when i select 'Android Honeycomb (Preview)', all the widgets
suddenly are shown in the correct location... no more crowding to the
top.  If i select any other value (e.g. Android 2.2), the widgets
start crowding to the top again.

One thing remains, though, to make it even more useful. When selecting
'Android Honeycomb (Preview), this is shown in the Error log:
(Shown on Eclipse Helios 3.6.1 with Android plugin version
9.0.0.v201101191456-93220, Windows XP, Android tools rev 9, Android
platform-tools rev 2)

java.lang.NumberFormatException: Color value '@color/screen_bg_top'
must start with #
        at
com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:
68)
        at
com.android.layoutlib.bridge.android.BridgeTypedArray.getColor(BridgeTypedArray.java:
273)
        at
android.graphics.drawable.GradientDrawable.inflate(GradientDrawable.java:
684)
        at
android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:
832)
        at android.graphics.drawable.Drawable.createFromXml(Drawable.java:
769)
        at
com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:
194)
        at
com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:
364)
        at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:303)
        at
com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:
274)
        at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart
$ConfigListener.onThemeChange(Unknown Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onThemeChange(Unknown
Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.access
$8(Unknown Source)
        at
com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite
$7.widgetSelected(Unknown Source)
        at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:
234)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
4066)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
2640)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
        at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
        at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
332)
        at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
664)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
149)
        at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
115)
        at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
196)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
110)
        at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
79)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
369)
        at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
179)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1407)

It seems that the ResourceHelper.getColor should support color-
references, not only constant color-values (starting with #).

When i select any other value than 'Android Honeycomb (Preview)', e.g
'Android 2.2', this exception does not happen.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to