XMLレイアウト includeとmarge
インクルードするファイルはこんな感じ
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/title_image"/>
</FrameLayout>
インクルードされるファイルはこんな感じ
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image" />
</FrameLayout>
これだと、FrameLayoutが重なっちゃうので<marge>をつかうと良い感じに
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/image" />
</merge>
コメント
コメントを投稿