Really appreciate you following up on this!

I'd also like to add I'm having many issues switching between
different configs (QVGA,HVGA, etc..) and changing the zoom level - it
will quite often cut off the rendering, showing maybe only a quarter
of the actual layout, forcing me to close and re-open the layout to
correct it. Hopefully, you've already seen this and are working on it.

Re: some of your responses:

>> - Properties are apparently not saved at every state, I see old values
>> randomly pop up (such as Text was empty, then it returns to @+id/
>> Button01)

> hmm that is very strange. Did you make sure you hit enter? I'll double
> check this tomorrow.

This is definitely occurring - I don't know if it has to do with
states, or maybe Buttons are just supposed to have text (maybe I
should switch to ImageView). Using this XML, try dragging the first
button (with no text, but a bg image) into the second LinearLayout:

<RelativeLayout android:id="@+id/RelativeLayout01"
        android:layout_width="fill_parent"
android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android";>
        <LinearLayout android:layout_alignParentTop="true"
                android:id="@+id/LinearLayout01"
android:layout_height="wrap_content"
                android:layout_width="wrap_content">
                <Button android:layout_height="wrap_content" android:id="@+id/
Button01"
                        android:layout_width="wrap_content" 
android:background="@drawable/
icon"></Button>
        </LinearLayout>
        <LinearLayout android:id="@+id/LinearLayout02"
                android:layout_height="wrap_content"
android:layout_width="wrap_content"
                android:layout_below="@+id/LinearLayout01">
                <Button android:text="@+id/Button02" android:id="@+id/Button02"
                        android:layout_width="wrap_content"
android:layout_height="wrap_content"></Button>
        </LinearLayout>
</RelativeLayout>


> > a) For layouts to work in 1.5, you have to put them in a specific
> > order - To do this correctly, I can no longer move views up or down, I
> > have to manually edit the xml - the new drag-and-drop seems to prevent
> > you from making a mistake in this regard, but doesn't allow it to be
> > corrected (i.e. you get a Red box with the X across it)
>
> Oh, is this with the issue what you cannot reference an item that's
> declared after?
> hmm yeah we're going to have to fix this.

Correct, in 1.5, you could not use a reference to a view until it was
already declared in RelativeLayout, "forward referencing" I think it
was referred to. Right now, if you add a button, then add another
aligned to the first, you cannot re-align the first with the second -
you get the red box with the white line through it - I assume this was
to prevent that. I'm not sure what could really be done to correct
that, and I don't know how much time you want to invest keeping the
layout editor compatible with 1.5.

Move up/down wasn't just useful for LinearLayout, it also adjusted the
order in which the views are declared in the xml. Before I could just
move items up or down on the layout using the buttons, which would
reorder the two views in the xml, making the references valid again.
Now, that has to be done manually in the xml.

> > b) The drag-and-drop method is very "align-happy" in RelativeLayout -
> > many times I have to go and remove alignments that it added
> > automatically - it reminds of of something akin to FrontPage creating
> > HTML.. throwing on properties that may or may not be necessary :)
>
> Well we certainly want to be able to add/remove links after drops.
> I think allowing any kind of alignment at drop is going to be very
> hard, and you can't have any links at all.
> It's probably going to be a necessary evil.
>
> > c) The new system makes it difficult if not impossible to align one
> > layout with another - for example, try to add two Linear Layouts
> > inside a RelativeLayout, one below the other.
>
> hmm how is that different from before?
>

Before, I can:

- add a RelativeLayout
- add a LinearLayout
- add a second LinearLayout, aligned below the first

Now, you cannot. The drag and drop does not allow you to align one
layout around another.

Try creating the following with drag and drop:

<RelativeLayout android:id="@+id/RelativeLayout01"
        android:layout_width="fill_parent"
android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android";>
        <LinearLayout android:layout_alignParentTop="true"
                android:id="@+id/LinearLayout01"
android:layout_height="wrap_content"
                android:layout_width="wrap_content">
                <Button android:text="@+id/Button01" android:id="@+id/Button01"
                        android:layout_width="wrap_content"
android:layout_height="wrap_content"></Button>
        </LinearLayout>
        <LinearLayout android:id="@+id/LinearLayout02"
                android:layout_height="wrap_content"
android:layout_width="wrap_content"
                android:layout_below="@+id/LinearLayout01">
                <Button android:text="@+id/Button02" android:id="@+id/Button02"
                        android:layout_width="wrap_content"
android:layout_height="wrap_content"></Button>
        </LinearLayout>
</RelativeLayout>



>
>
> > On Dec 12, 3:51 pm, Bob Kerns <r...@acm.org> wrote:
> >> I thought I had this issue. But it turned out to be that I didn't know
> >> how to use the new RelativeLayout functionality.
>
> >> You can't just drop the new view anywhere, you have to drop it onto
> >> the specific locations that indicate what relationship the new view
> >> should have to what's there. Including the initial content view, which
> >> you need to relate to the parent.
>
> >> It's really quite slick, guiding you toward a "correct-by-
> >> construction" approach that really helps you get relative layouts
> >> right without thinking much about it. But it's baffling at first.
>
> >> On Dec 12, 12:19 pm, "Tim H." <timho...@gmail.com> wrote:
>
> >> > - After deleting some views, suddenly I can no longer add new views
>
> > --
> > 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
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
>
> Please do not send me questions directly. Thanks!

-- 
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