New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 740078 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 725019



Sign in to add a comment

Determine what kind of object the Support Library WebView should be

Project Member Reported by gsennton@chromium.org, Jul 7 2017

Issue description

We have several options for how the Support library WebView can be implemented:
1. compat.WebView is a subclass of android.webkit.WebView.
2. compat.WebView has a member of type android.webkit.WebView.
3. compat.WebView inherits from the superclass of android.webkit.WebView (AbsoluteLayout), and doesn’t rely on any code from android.webkit.*


Option nr.1 doesn't work because we want the support library to not rely on the Android version of the device - if we subclass WebView we are still heavily connected to the Android version of the device.
Option 2 doesn't really make sense on L+ because we would still depend on classes from the Android version on the device instead of our own custom-created support-library classes.

So option nr.3 seems like the most promising solution - using reflection into support_lib_glue on L+ devices, and using the android.webkit.WebViewProvider on KitKat (if we want to support KK).
 

Comment 1 by boliu@chromium.org, Jul 17 2017

agree 3 is probably the only option
Status: Fixed (was: Assigned)
Just to clarify regarding option 1: the issue here is the use of all related classes passed to the android.webkit.WebView. E.g. WebView contains the method setWebViewClient(WebViewClient). If we subclass android.webkit.WebView we will still have to pass an android.webkit.WebViewClient to setWebViewClient. This doesn't make sense in the support library where we want a new version of WebViewClient, containing all the callbacks from the newest Android version.

Option 3 is the one I've been using when prototyping - it seems fine.

Sign in to add a comment