mlm mlm - 3 months ago 23
Android Question

What does android.support.v4.app.FragmentActivity extend?

The webpage with the following address states that the class FragmentActivity extends the class Activity:

https://developer.android.com/reference/android/support/v4/app/FragmentActivity.html

However, when I bring up the documentation for the android.support.v4.app.FragmentActivity class within Android Studio, it states that FragmentActivity extends android.support.v4.app.BaseFragementActivityHoneycomb.

What is the reason for the discrepancy and which is correct?

Answer

This goes up to BaseFragmentActivityDonut. These base fragments are just an implementation detail of FragmentActivity and should not concern you at all. In the library I use, FragmentActivity directly extends BaseFragmentActivityJB. In the future there might be something like BaseFragmentActivityM or some compatibility layer for even newer platforms.

For your programming just assume it extends Activity only, like the documentation states.