-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Android: Set WebViewManager methods/fields as protected instead of pr…
…ivate Summary: **Motivation** See discussion in #10946. The motivation is to make `ReactWebViewManager` more extensible. Re-using logic from the ReactWebViewManager when implementing your own custom WebView is a pain since so much of the logic is set as `private`. This PR makes for easier extension/overriding of behavior, and less duplication of code, since most of the methods/fields are set as `protected` instead. I've also made some "create" methods for the `WebView` and `WebViewBridge` so they can more easily be overridden. **Test plan** The test plan is the same as the other PR (#10946). I've made an simple test app which extends `RCTWebViewManager`: https://github.com/cbrevik/overrideWebview See [CustomWebViewManager.java](https://github.com/cbrevik/overrideWebview/blob/master/android/app/src/main/java/com/overridewebview/CustomWebViewManager.java) for a simple implementation. CC shergin (#10946 (comment)) Closes #14261 Differential Revision: D5413922 Pulled By: shergin fbshipit-source-id: d2f6d478f2a147e2e7b5e05c195a8b28a0a3d576
- Loading branch information
1 parent
aafccdf
commit e2c87b5
Showing
1 changed file
with
26 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters