theo theo
theo theo

Reputation: 131

Tabhost setup() not working

I follow the tutorial in android documentation how to use Tabhost within Fragment, But I'm getting always

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)

My setup command is like this:

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

Upvotes: 1

Views: 1536

Answers (1)

Tepes Lucian
Tepes Lucian

Reputation: 906

Sounds like your class in which you call the setup method extends android.app.Fragment and not android.support.v4.app.Fragment.

Upvotes: 9

Related Questions