Skip to content

Commit 34f0c40

Browse files
committed
webview: add enableZoom() method
1 parent f2fff78 commit 34f0c40

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pythonforandroid/bootstraps/webview/build/src/main/java/org/kivy/android/PythonActivity.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,16 @@ public void run() {
240240
mActivity.runOnUiThread(new LoadUrl(url));
241241
}
242242

243+
public static void enableZoom() {
244+
mActivity.runOnUiThread(new Runnable() {
245+
@Override
246+
public void run() {
247+
mWebView.getSettings().setBuiltInZoomControls(true);
248+
mWebView.getSettings().setDisplayZoomControls(false);
249+
}
250+
});
251+
}
252+
243253
public static ViewGroup getLayout() {
244254
return mLayout;
245255
}

0 commit comments

Comments
 (0)