Android relative layout problem with gravity
Posted
by DixieFlatline
on Stack Overflow
See other posts from Stack Overflow
or by DixieFlatline
Published on 2010-05-10T16:28:48Z
Indexed on
2010/05/10
16:34 UTC
Read the original article
Hit count: 272
How can i put textview with id="naslov" to the center? I also tried with layout_gravity="center" but that doesn't work either.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/naslov"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20dip"
android:text="Povzetek"
android:gravity="center"/>
<TextView
android:id="@+id/aha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="10dip"
android:text="Vseh oddaj:"
android:layout_below="@id/naslov"/>
</RelativeLayout>
© Stack Overflow or respective owner