0
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.v4.app.FragmentTabHost
        android:id="@android:id/tabhost"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

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

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

            <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

        </LinearLayout>

    </android.support.v4.app.FragmentTabHost>

</RelativeLayout>

I get this Rendering Problem:

Exception raised during rendering: Must call setup() that takes a Context and FragmentManager

But if I change from android.support.v4.app.FragmentTabHost to TabHost, it is ok. What have I done wrong?

João Oliveira
  • 422
  • 3
  • 17
  • Possible duplicate of [FragmentTabHost graphical layout doesn't render](http://stackoverflow.com/questions/14370745/fragmenttabhost-graphical-layout-doesnt-render) – ekeitho Feb 26 '17 at 00:08
  • Yes, but there is no answer. Likely, it's a bug in `FragmentTabHost`. https://code.google.com/p/android/issues/detail?id=78772 – João Oliveira Feb 26 '17 at 11:05

0 Answers0