Ich startete eine neue Android-Anwendung basierend auf Master/Detail-Flow-Vorlage mit ADT Eclipse. Diese Vorlage erstellt zwei Aktivitäten, ein Hauptfragment und ein Detailfragment, um auf kleine und größere Bildschirme zu passen.Was ist Werkzeuge: Layout in Fragment XML-Datei?
Ich bemerkte die activity_item_list.xml
Datei, um das tools:layout
Attribut hat:
<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" />
Ich habe versucht, das Attribut und die App läuft auf die gleiche Weise, aber in den grafischen Layout-Registerkarte von ADT, eine Nachricht bitten, mich zu löschen für:
Pick Vorschau Layout aus dem "Fragmente Layout" Kontextmenü
Was ist ihr Zweck? Ist es nur für die Vorschau im grafischen Layout?
Weitere Informationen über Tools-Namespace: http://stackoverflow.com/questions/11078487/whats-toolscontext-in-android-layout-files – josuadas