Skip to content
This repository was archived by the owner on Apr 10, 2019. It is now read-only.
This repository was archived by the owner on Apr 10, 2019. It is now read-only.

Use android.app.Activity, android.app.DialogFrament #15

@mkonicek

Description

@mkonicek

android.support.v4.app.Fragment (used in a few places) is a backport of new the Fragment APIs added in Android version 11. It's a way to use the fragment APIs on very old Android versions (Gingerbread and below).

React Native has been using the "new" android.app.Activity since the first release:
https://github.com/facebook/react-native/blob/42eb5464fd8a65ed84b799de5d4dc225349449be/local-cli/generator-android/templates/package/MainActivity.java

Using the fragment APIs from the support library makes it difficult for new apps using android.app.Activity to use material-dialogs and other modules, discussion here: facebook/react-native#5206

React Native itself requires API 16+ (depends on the Choreographer API) so supporting Gingerbread (API 10) and below is not possible with React Native apps in any case.

I don't think there's a reason to the APIs from the support library (android.support.v4.app.Fragment, FragmentActivity etc.) in new apps?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions