Android Studio - how to add a preview for layouts I will inflate somewhere in my code? -


i have 3 layouts:

fragment_tag.xml:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"               android:orientation="vertical"               android:layout_width="fill_parent"               android:layout_height="fill_parent">  </linearlayout> 

fragment_stunde.xml:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"               android:orientation="vertical"               android:layout_width="fill_parent"               android:layout_height="wrap_content"               android:id="@+id/linearlayout"> </linearlayout> 

fragment_fach.xml:

<relativelayout         android:layout_width="fill_parent"         android:layout_height="fill_parent"         xmlns:android="http://schemas.android.com/apk/res/android">      <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/textview_raum"/>      <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/textview_fach"/>      <textview             android:layout_width="wrap_content"             android:layout_height="wrap_content"             android:id="@+id/textview_lehrer"/> </relativelayout> 

what want content of fragment_fach.xml displayed in fragment_stunde.xml preview in ide. (fragment_stunde.xml should displayed in fragment_tag.xml) inflate fragment_fach.xml somewhere in code , want see how looks in other fragment i'm able improve design.

i tried add tools:listitem="@layout/fragment_fach" fragment_stunde.xml doesn't work.

is possible anyway?

make sure add root element:

xmlns:tools="http://schemas.android.com/tools" 

cheers


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -