-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
deprecate ReactFragmentActivity #19741
deprecate ReactFragmentActivity #19741
Conversation
@hramos what do you think about this PR? I think this will give developers to change their code, then cleanup RN codebase to remove outdated Android versions. |
SGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Android Support Library page says https://developer.android.com/topic/libraries/support-library/ > Caution: Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages. For more information, see Version Support and Package Names in this document. _android.support.v4.app.FragmentActivity_ is used to support **Fragment**s on Android API versions below 11. Now, we support only API version 14 and above, it's ok to remove _ReactFragmentActivity_ that extends _FragmentActivity_. Once ReactFragmentActivity removed, we can remove some codes that use _android.support.v4_ to work support _ReactFragmentActivity_ on **unsupported** Android versions. CI is failing for unknown reasons: https://circleci.com/gh/dulmandakh/react-native/278 > Received 'killed' signal Everything will build and work just fine, except showing _ ReactFragmentActivity_ as deprecated Closes facebook#19741 Differential Revision: D8454968 Pulled By: hramos fbshipit-source-id: e5f901438ef764163af013fe854904a28c73070a
Summary: Android Support Library page says https://developer.android.com/topic/libraries/support-library/ > Caution: Starting with Support Library release 26.0.0 (July 2017), the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14) for most library packages. For more information, see Version Support and Package Names in this document. _android.support.v4.app.FragmentActivity_ is used to support **Fragment**s on Android API versions below 11. Now, we support only API version 14 and above, it's ok to remove _ReactFragmentActivity_ that extends _FragmentActivity_. Once ReactFragmentActivity removed, we can remove some codes that use _android.support.v4_ to work support _ReactFragmentActivity_ on **unsupported** Android versions. CI is failing for unknown reasons: https://circleci.com/gh/dulmandakh/react-native/278 > Received 'killed' signal Everything will build and work just fine, except showing _ ReactFragmentActivity_ as deprecated Closes #19741 Differential Revision: D8454968 Pulled By: hramos fbshipit-source-id: e5f901438ef764163af013fe854904a28c73070a
I don't think this is the right approach. It is still recommended by android team to use classes from support library instead of relying on the corresponding classes from SDK. It makes it more future proof and avoid compatibility related problems when new methods gets added. For source please see this paragraph on the link you cited: https://developer.android.com/topic/libraries/support-library/ Also note that android is deprecating a number of methods that's been a part of SDK and recommend to use corresponding methods from the support library. For example If we remove My suggestion is to actually follow the android team recommendation I posted in first paragraph and change |
Sounds good. @dulmandakh do you think you can follow @kmagiera's suggestion above and send a PR? |
Android Support Library page says https://developer.android.com/topic/libraries/support-library/
android.support.v4.app.FragmentActivity is used to support Fragments on Android API versions below 11. Now, we support only API version 14 and above, it's ok to remove ReactFragmentActivity that extends FragmentActivity.
Once ReactFragmentActivity removed, we can remove some codes that use android.support.v4 to work support ReactFragmentActivity on unsupported Android versions.
CI is failing for unknown reasons: https://circleci.com/gh/dulmandakh/react-native/278
Test Plan
Everything will build and work just fine, except showing _ ReactFragmentActivity_ as deprecated