I have an activity that uses a TabHost
associated with ViewPager
. Although it works fine, I decided to replace it with FragmentTabHost
. However, after making some changes, I am getting a rendering exception whose messages is as follows.
W/System.err(21723): java.lang.IllegalStateException: No tab known for tag null
W/System.err (21723): at android.support.v4.app.FragmentTabHost.doTabChanged(FragmentTabHost.java:326)
W/System.err(21723): at android.support.v4.app.FragmentTabHost.onAttachedToWindow(FragmentTabHost.java:276)
W/System.err(21723): at android.view.View.dispatchAttachedToWindow(View.java:12064)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2707)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2714)
W/System.err(21723): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1339)
W/System.err(21723): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1131)
W/System.err(21723): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4611)
W/System.err(21723): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
W/System.err(21723): at android.view.Choreographer.doCallbacks(Choreographer.java:555)
Basically what I did was to make a class named IconSwipeyTabsView
which extends FragmentTabHost
and use in a main activity or fragment. I did a lot of research on Google and StackOverflow but none of them gave me a clear answer. FYI, these are the urls of the two core files.
If anyone can help me out, I'd really appreciate it. Thanks!