Why Are There Two Fragment Classes In Android?
Solution 1:
According to the documentation, fragments were introduced in Android 3.0 (API 11). Around the same time, Google also released the Android Support Library which allowed developers to use fragments and other new APIs on devices that ran older versions of Android. This library contained classes with the exact same functionality as classes that shipped with the Android API on newer devices. Since these libraries can be compiled directly into your APK file, you no longer have to rely on the features being available on the target device. Some classes are now only available from the Support Library and rely on the support Fragment
from this library rather than using the native Fragment
class even though it is available on basically all devices now in use.
Post a Comment for "Why Are There Two Fragment Classes In Android?"