Skip to content

Commit

Permalink
Merge pull request #2261 from t-arn/android_pinchzoom
Browse files Browse the repository at this point in the history
Added pinch-to-zoom in WebView on Android
  • Loading branch information
freakboy3742 authored Dec 6, 2023
2 parents 6c71478 + e8f56b3 commit 2000b68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android/src/toga_android/widgets/webview.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def create(self):
self.settings = self.native.getSettings()
self.default_user_agent = self.settings.getUserAgentString()
self.settings.setJavaScriptEnabled(True)
# enable pinch-to-zoom without the deprecated on-screen controls
self.settings.setBuiltInZoomControls(True)
self.settings.setDisplayZoomControls(False)

def get_url(self):
url = self.native.getUrl()
Expand Down
1 change: 1 addition & 0 deletions changes/2261.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The pinch-to-zoom feature has been added to WebView on Android.

0 comments on commit 2000b68

Please sign in to comment.