Question

i get this error in eclipse while implementing FragmentTabHost

The method setup(Context, FragmentManager, int) in the type FragmentTabHost is not applicable for the arguments (Context, FragmentManager, int)

been following the official android post and refereed to a couple of other sites too,

http://developer.android.com/reference/android/support/v4/app/FragmentTabHost.html

any suggestions ??

Was it helpful?

Solution

I guess you're extending FragmentActivity and using classes from compatibility package. When calling setup, you're probably calling it like this:

setup(this, getFragmentManager(), containerId);

Call it like this:

setup(this, getSupportFragmentManager(), containerId);

This answer is based on assumptions - since you didn't provide more details about how you're calling setup and what are your parent classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top