ADT Eclipse を使用して、マスター/詳細フロー テンプレートに基づいて新しい Android アプリケーションを開始しました。このテンプレートは、小さな画面と大きな画面に合わせて、マスター フラグメントと詳細フラグメントの 2 つのアクティビティを作成します。
activity_item_list.xml
ファイルに属性があることに気付きましたtools:layout
:
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/item_list"
android:name="com.example.fragmenttwopanel.ItemListFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
tools:context=".ItemListActivity"
tools:layout="@android:layout/list_content" />
属性を削除しようとすると、アプリは同じように実行されますが、ADT のグラフィカル レイアウト タブで次のように尋ねるメッセージが表示されます。
[フラグメント レイアウト] コンテキスト メニューからプレビュー レイアウトを選択します。
その目的は何ですか?グラフィカルなレイアウトでのプレビュー用ですか?