I have a relative layout with an ImageView in it and want to center the TextView in side the ImageView, in the activity layout xml file.
Here is the image view and then what I have tried for the TextView
This is inside of the relative layout:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minHeight="170dp"
android:minWidth="170dp"
android:id="@+id/logoBackground"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_marginLeft="33dp"
android:layout_marginStart="33dp"
android:layout_marginTop="33dp"
android:contentDescription="@string/content_description_useless"
android:background="#ffffd0cd" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/capital_u"
android:id="@+id/textView"
android:textSize="30sp"
android:layout_centerInParent="@+id/logoBackground"/>
But it doesn't seem to be working.
Thanks for the help in advance.
No comments:
Post a Comment