0


I have 2 framelayouts which are fragment container.
The problem is that the XML previewer shows nothing.
The app works and there is no error message.
I tried to add tools:showIn="@layout/..." in the different framelayouts but it did not work.

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.sarahpoehler.testapp.MainActivity">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <FrameLayout
            android:id="@+id/container_fragment_one"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>

        <FrameLayout
            android:id="@+id/container_fragment_two
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
    </LinearLayout>
</ScrollView>

Here the XML preview"

Sarah Pöhler
  • 550
  • 1
  • 7
  • 18
  • 1
    Don't worry! add components to your frame layout and run the app. It will be displayed on screen. Your framelayouts has wrap_content properties. –  Nov 10 '16 at 17:51
  • hi! what do you mean with components? The App runs and the emulator shows everything. But the xml preview does not show all these stuff. – Sarah Pöhler Nov 10 '16 at 17:53
  • By components, I mean add buttons, image view etc. to frame layout. –  Nov 10 '16 at 17:55
  • if this is already added, Clean Project or restart android studio. It will be okay. –  Nov 10 '16 at 17:56
  • its cleaned up. everything works. I only want to see the fragment contents in the xml previewer – Sarah Pöhler Nov 10 '16 at 17:57
  • please some one ans my question. http://stackoverflow.com/questions/40533865/javax-mail-connection-timed-out-only-when-connected-to-wifi?noredirect=1#comment68307502_40533865 –  Nov 10 '16 at 17:57
  • click on your layout and see to the preview. It should be displaying. –  Nov 10 '16 at 17:58
  • it displaying the image I have uploaded – Sarah Pöhler Nov 10 '16 at 18:00
  • that's it !.... –  Nov 10 '16 at 18:01
  • no! omg -.- I WANT TO SEE THE FRAGMENTS IN THE XML PREVIWER. you dont understand me – Sarah Pöhler Nov 10 '16 at 18:03

0 Answers0