Tabhost设置()不起作用

时间:2013-12-14 18:23:47

标签: android android-tabhost fragment-tab-host

我按照android文档中的教程如何在Fragment中使用Tabhost,但我总是

The method setup(android.content.Context, android.support.v4.app.FragmentManager, int) in the type FragmentTabHost is not applicable for the arguments (android.content.Context, android.app.FragmentManager, int)

我的设置命令是这样的:

mTabHost.setup( getActivity().getApplicationContext(), getChildFragmentManager(), R.layout.fragment_vc_view);

1 个答案:

答案 0 :(得分:9)

听起来您在其中调用设置方法的类扩展android.app.Fragment而不是android.support.v4.app.Fragment