Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

I can't get android:layout_below to work

$
0
0

So it turns out it's just the designer that isn't showing it correctly. When I deploy it to my device it displays exactly as I would expect it to

Hi guys,

I simply cannot get android:layout_below to work as expected.

Here's my code

<TextView
    android:layout_centerHorizontal="true"
    android:text="This is a test app"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:minWidth="25px"
    android:minHeight="25px"
    android:id="@+id/textView1" />

<Button
    android:layout_width="200sp"
    android:layout_height="50sp"
    android:layout_centerHorizontal="true"
    android:layout_below="@id/textView1"/>

It's in a RelativeLayout (I don't know why it's not showing the RelativeLayout code though) and when I view it in the designer view the button is just sat on top of textView1 instead of below it.

Where am I going wrong?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>