I am attempting to get some text to appear in the centre of an ImageView
. But using this xml (below) what I see its the text wedged in the top left of the FrameLayout
. What did I do wrong?
<FrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="1"
>
<ImageView
android:id="@+id/levbut"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:src="@drawable/starbut"
/>
<TextView
android:id="@+id/tvtest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello"
/>
</FrameLayout>