I am having huge problems with the Android XML layout previewer not giving anywhere close to an accurate representation of my XML layout. The layout appears just fine when run, it's just the previewer.
Here's some example XML:
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:id="@+id/sign_up_accountexists"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:gravity="center"
android:text="You already have an account. Please sign in, or select 'forgot password'."
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffffff" />
<LinearLayout
android:layout_width="350dp"
android:layout_height="wrap_content"
android:layout_below="@+id/sign_up_accountexists"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp" >
<Button
android:id="@+id/button1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Sign In" />
<Button
android:id="@+id/button2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="Forgot Password" />
</LinearLayout>
<TextView
android:id="@+id/sign_up_differentaddress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="Sign up using a different address"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#ffffffff" />
</RelativeLayout>
Here the LinearLayout with the buttons is clearly below the sign_up_accountexists, and that's how it's shown when the program is run. But Eclipse shows:
[Buttons]
[sign_up_accountexists]
[sign_up_differentaddress]
The really odd thing is that if I remove _differentaddress the other two flip round correctly. It would be really helpful to get the previewer working.
So my question is twofold, (1) Is there anything I'm doing wrong in my XML which could trip up the previewer? (2) Do people generally use the previewer anyway? It's a great idea, but if generally known to be buggy then I will (reluctantly) avoid it.
One note: the LinearLayout has android:layout_below="@+id/sign_up_accountexists". Eclipse put that plus sign in there, which I thought was wrong. Removing it makes no difference though.
Many thanks in advance for answering a question which is consuming all my living hours...