Question

I want to use Fragments in my application, but I cannot extend FragmentActivity because my application already extends an activity that is part of a library. Since this means that I cannot call getSupportFragmentManager(), I am looking for a workaround that would allow me to use Fragments without having to extend FragmentActivity. Is it possible?

Was it helpful?

Solution

Your library is going to need to extend the FragmentActivity.

I would be concerned about a library that requires you to use their base activities anyway.

As mentioned (where possible) grab the library source code and add it as a library project to eclipse and make its activities extend the FragmentActivity class.

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