Support fragment vs Native fragment

Viewed 839

We have an app which has minimum SDK level set to API 21. We are currently using support fragments and are now discussing migrating to native fragments.

This discussion of the move towards native fragment is because support fragment is meant for lower API devices which don't support native fragments. Now that every device has fragment and they seem stable. So why not migrate to native fragments for leaner implementation.

New features will hopefully be supported for native fragments with support library v13's FragmentCompat, things like ViewPager are already present in support library v13. But platform specific bugs will require API specific handling.

On the other hand with support library v4's Fragment we get

  1. Backward compatibility with features e.g. runtime permissions.

  2. Consistency across all the platforms as it uses the same implementation across platforms. No platform specific handling.

  3. All new methods in next android version are available to use across all the platform.

  4. Support library is released more frequently than Android platforms. So bug fixes will be faster and we'll have more control when pushing that fix. Don't need to wait for OEMs to update each phone but rather update the support library in the app.

But are these benefit enough to hang on to the old code which is meant for devices with API level less than 11?

1 Answers
Related