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