liyqxtu / droiddraw

Automatically exported from code.google.com/p/droiddraw
0 stars 0 forks source link

Simple Google example does not render properly #87

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:
1. Render the XML from http://code.google.com/android/devel/ui/xml.html 
(you will need to add the missing close quote on the namespace attribute).
I have included the fixed XML here:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="fill_parent" 
                android:layout_height="wrap_content"
                android:background="@drawable/blue"
                android:padding="10px">
    <TextView id="@+id/label" 
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content" 
              android:text="Type here:"/>
    <EditText id="@+id/entry" 
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content" 
              android:background="@android:drawable/editbox_background"
              android:layout_below="@id/label"/>
    <Button id="@+id/ok" 
            android:layout_width="wrap_content" 
            android:layout_height="wrap_content" 
            android:layout_below="@id/entry"
            android:layout_alignParentRight="true"
            android:layout_marginLeft="10px"
            android:text="OK" />
    <Button android:layout_width="wrap_content" 
            android:layout_height="wrap_content"
            android:layout_toLeftOf="@id/ok"
            android:layout_alignTop="@id/ok"
            android:text="Cancel" />
</RelativeLayout>

Expected output: 
   Shown at the URL above.

Actual output: 
   The Cancel button is placed incorrectly (in both the X and Y 
directions).

Reproduced on Droid Draw dd.r1.b12
   in Java 1.6.0_11
   in IE 7.0.5730.11 
   in Windows XP 5.1.2600 Service Pack 3 Build 2600

Additional info:
It seems that Droid Draw does not properly handle the layout_toLeftOf 
attribute.

Original issue reported on code.google.com by ChrisF...@gmail.com on 15 Jan 2009 at 8:06

GoogleCodeExporter commented 8 years ago
That UI XML is broken.  The "id" properties should be "android:id" the "id" 
alone
syntax is from an older version of the SDK.  If you change "id" to "android:id" 
in
your example XML the UI loads fine.

Original comment by brendan....@gmail.com on 9 Mar 2009 at 5:15