の中央にテキストを表示しようとしていますImageView
。しかし、この xml (以下) を使用すると、FrameLayout
. 私は何を間違えましたか?
<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>