nucleartux / react-native-date

React Native date and time pickers for Android
MIT License
47 stars 20 forks source link

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

Open mkonicek opened 8 years ago

mkonicek commented 8 years ago

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: https://github.com/facebook/react-native/pull/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?