Skip to content

Commit cd81a6f

Browse files
authored
Merge pull request kivy#2386 from obfusk/webview-zooming
webview: add enableZoom() method
2 parents 548a908 + 34f0c40 commit cd81a6f

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
@@ -249,6 +249,16 @@ public void run() {
249249
mActivity.runOnUiThread(new LoadUrl(url));
250250
}
251251

252+
public static void enableZoom() {
253+
mActivity.runOnUiThread(new Runnable() {
254+
@Override
255+
public void run() {
256+
mWebView.getSettings().setBuiltInZoomControls(true);
257+
mWebView.getSettings().setDisplayZoomControls(false);
258+
}
259+
});
260+
}
261+
252262
public static ViewGroup getLayout() {
253263
return mLayout;
254264
}

0 commit comments

Comments
 (0)