-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[webview_flutter]Add zoom to android webview #3325
[webview_flutter]Add zoom to android webview #3325
Conversation
* Adding default values to bools to avoid npe * Updating mismatched param names * Updating tests
* Formatting and adding (Android only)
* master: [q-w] Update Flutter SDK constraint (flutter#3323) [i-p] Update Flutter SDK constraint (flutter#3322) [d-g] Update Flutter SDK constraint (flutter#3321) [a-c] Update Flutter SDK constraint (flutter#3320) [image_picker_platform_interface] Pass Uri to package:http APIs (flutter#3309) Exclude null-safe plugins from testing on stable (flutter#3318) [documentation] [url_launcher] fix for readme code sample (flutter#3308) # Conflicts: # packages/webview_flutter/CHANGELOG.md
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
CLA should come this week. I thought I was already added as a contributor on our corporate one |
@googlebot I signed it!
…On Fri, Dec 11, 2020 at 8:40 PM google-cla[bot] ***@***.***> wrote:
Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project (if not, look below for help).
Before we can look at your pull request, you'll need to sign a Contributor
License Agreement (CLA).
📝 *Please visit https://cla.developers.google.com/
<https://cla.developers.google.com/> to sign.*
Once you've signed (or fixed any issues), please reply here with @googlebot
I signed it! and we'll verify it.
------------------------------
What to do if you already signed the CLA Individual signers
- It's possible we don't have your GitHub username or you're using a
different email address on your commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
Corporate signers
- Your company has a Point of Contact who decides which employees are
authorized to participate. Ask your POC to be added to the group of
authorized contributors. If you don't know who your Point of Contact is,
direct the Google project maintainer to go/cla#troubleshoot (Public
version <https://opensource.google/docs/cla/#troubleshoot>).
- The email used to register you as an authorized contributor must be
the email used for the Git commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
- The email used to register you as an authorized contributor must
also be attached to your GitHub account
<https://github.com/settings/emails>.
ℹ️ *Googlers: Go here
<https://goto.google.com/prinfo/https%3A%2F%2Fgithub.com%2Fflutter%2Fplugins%2Fpull%2F3325>
for more info*.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3325 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBO4V7MLBCRYHNR634F7J3SULX33ANCNFSM4UXV4OWA>
.
--
Nick Bradshaw
503-597-8825
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
* master: Merge null-safety plugins (flutter#3324) [camera] Add implementations for `camera_platform_interface` package. (flutter#3302)
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
* master: [android_intent] Migrate to nnbd (flutter#3328) [share] Migrate to null-safety (flutter#3311) [webview_flutter] Migrate to nnbd (flutter#3327) # Conflicts: # packages/webview_flutter/CHANGELOG.md # packages/webview_flutter/lib/platform_interface.dart # packages/webview_flutter/lib/webview_flutter.dart # packages/webview_flutter/pubspec.yaml # packages/webview_flutter/test/webview_flutter_test.dart
@googlebot I signed it!
…On Mon, Dec 14, 2020 at 1:51 PM google-cla[bot] ***@***.***> wrote:
Thanks for your pull request. It looks like this may be your first
contribution to a Google open source project (if not, look below for help).
Before we can look at your pull request, you'll need to sign a Contributor
License Agreement (CLA).
📝 *Please visit https://cla.developers.google.com/
<https://cla.developers.google.com/> to sign.*
Once you've signed (or fixed any issues), please reply here with @googlebot
I signed it! and we'll verify it.
------------------------------
What to do if you already signed the CLA Individual signers
- It's possible we don't have your GitHub username or you're using a
different email address on your commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
Corporate signers
- Your company has a Point of Contact who decides which employees are
authorized to participate. Ask your POC to be added to the group of
authorized contributors. If you don't know who your Point of Contact is,
direct the Google project maintainer to go/cla#troubleshoot (Public
version <https://opensource.google/docs/cla/#troubleshoot>).
- The email used to register you as an authorized contributor must be
the email used for the Git commit. Check your existing CLA data
<https://cla.developers.google.com/clas> and verify that your email is
set on your git commits
<https://help.github.com/articles/setting-your-email-in-git/>.
- The email used to register you as an authorized contributor must
also be attached to your GitHub account
<https://github.com/settings/emails>.
ℹ️ *Googlers: Go here
<https://goto.google.com/prinfo/https%3A%2F%2Fgithub.com%2Fflutter%2Fplugins%2Fpull%2F3325>
for more info*.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3325 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBO4V5BNQ2HPRBJDOAMDPLSU2CE3ANCNFSM4UXV4OWA>
.
--
Nick Bradshaw
503-597-8825
|
* master: [camera] Ios support documentation (flutter#3335) Remove custom null safety analysis_options files (flutter#3339) [webview_flutter] Added 'allowsInlineMediaPlayback' property (flutter#3334) [camera_platform_interface] Add torch definition to the FlashModes enum (flutter#3326) [wifi_info_flutter] Edit sample wifi_info_flutter plugin (flutter#3271) # Conflicts: # packages/webview_flutter/CHANGELOG.md # packages/webview_flutter/android/src/main/java/io/flutter/plugins/webviewflutter/FlutterWebView.java # packages/webview_flutter/lib/platform_interface.dart # packages/webview_flutter/pubspec.yaml
@amirh I am unclear as to how to address the failure on the |
* Updating comment formatting in webview.dart
This pull request is not suitable for automatic merging in its current state.
|
@NickalasB Could you merge in the latest master? The test failure was an out-of-band failure (due to a Flutter change) than needed an in-tree fix several days ago. |
* master: [webview_flutter] Deprecate evaluateJavascript in favour of runJavaScript and runJavaScriptForResult. (flutter#4403) [webview_flutter] Add interface methods to load local files and HTML strings. (flutter#4446) [ci] add pedantic dep to new in_app_purchase pkgs (flutter#4471) [ci] Remove unused dep from file_selector. (flutter#4468) [ci] update build_runner dep in android_intent and file_selector example (flutter#4467) [webview_flutter] Add platform interface method `loadRequest`. (flutter#4450) Remove -Werror from deprecated plugin Android builds (flutter#4466) [webview_flutter] Update webview packages for Android and iOS to implement `runJavascript` and `runJavascriptReturningResult`. (flutter#4402) [camera] Fix CamcorderProfile Usages (flutter#4423) [google_sign_in] Use a transparent image as a placeholder for the `GoogleUserCircleAvatar` (flutter#4391) [in_app_purchase]IAP/platform interface add cancel status (flutter#4093) [image_picker] doc:readme image picker misprints (flutter#4421) Support Hybrid Composition through the GoogleMaps Widget (flutter#4082) [path_provider] started supporting background platform channels (flutter#4443) [device_info] started using Background Platform Channels (flutter#4456) # Conflicts: # packages/webview_flutter/webview_flutter/CHANGELOG.md # packages/webview_flutter/webview_flutter/pubspec.yaml
✅ |
🎉 Thanks @NickalasB and @stuartmorgan |
Description
Updated description as of 09/08/2021
This PR adds the ability to toggle
zoomEnabled
on iOS and Android for theWebView
widget. The PR adds the currently-missing zoom functionality to the Android WebView. The ability to double tap zoom and pinch zoom is a standard expectation on most all WebViews so this change enables that behavior by default for Android.If for some reason, a user wishes to disable zoom, there is now a unified API to do that.
Old Description
This PR adds the currently-missing zoom functionality to the Android WebView. The ability to double tap zoom and pinch zoom is a standard expectation on most all WebViews so this change enables that behavior by default. This also defaults to enabling Android'ssetLoadWithOverviewMode
so content defaults to being zoomed out all the way.This change was needed by our team as one major user-flow for us is being able to load an "additional details" webpage rendered in a WebView. Unfortunately, on Android this content is not scaled to fit the device screen and there is no way to zoom in or out.The Android WebView doesn't make it as straightforward as one would hope to enable this functionality.For enabling the ability to zoom we have to set the following flags:setSupportZoom(true)
setBuiltInZoomControls(true)
setDisplayZoomControls(false) -> on-screen zoom controls are deprecated in Android... so it's recommended to set this to false
To ensure the content starts out zoomed out and fits to the screen we have to set the following flags:setLoadWithOverviewMode(true)
setUseWideViewPort(true)
I am defaulting to enabling these features while still allowing the fine-grained control to change them if the user chooses.This PR: WebView w/default values
This PR: WebView with the following params set:
enableZoom(false)
setSupportZoom(false)
setBuiltInZoomControls(false)
setDisplayZoomControls(false)
setLoadWithOverviewMode(false)
setUseWideViewPort(false)
Related Issues
Implements flutter/flutter#75196
Implements flutter/flutter#70731
Implements flutter/flutter#48283
Relates to flutter/flutter#48245
Relates to flutter/flutter#60921
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
). This will ensure a smooth and quick review process.///
).flutter analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?