私はLinearLayoutを持っています。私はイメージビューの途中にテキストを配置したいだけです。これまでイメージビューの内部にテキストビューを集中させる方法android
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:layout_height="wrap_content">
<TextView
android:id="@+id/state_area"
android:layout_width="wrap_content"
android:textColor="#F000"
android:layout_height="90dp"
android:textSize="40sp"
android:layout_marginBottom="24dp"
android:layout_gravity="center_horizontal" />
</LinearLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/shape"
android:layout_gravity="center" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:src="@drawable/shape"
android:layout_gravity="center" />
</LinearLayout>
結果:
使用でframeLayout –