投稿

10月, 2013の投稿を表示しています

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" andr

android.view.LayoutInflater

Activity public LayoutInflater getLayoutInflater () LayoutInflater public View inflate (int resource, ViewGroup root)