diff options
author | Allan Wang <me@allanwang.ca> | 2019-07-02 16:29:28 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-07-02 16:29:28 -0700 |
commit | 4c551386b100ea4b694c1e8f44596ba369e6b068 (patch) | |
tree | f18e167cf804e70820703e6951060004ef12e774 /app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | |
parent | 99e70f4489ce210e514c9194cdac288d2de651c4 (diff) | |
download | frost-4c551386b100ea4b694c1e8f44596ba369e6b068.tar.gz frost-4c551386b100ea4b694c1e8f44596ba369e6b068.tar.bz2 frost-4c551386b100ea4b694c1e8f44596ba369e6b068.zip |
Prevent horizontal swipes if html element can scroll horizontally
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt index 0d980ba0..d75a4f1f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostJSI.kt @@ -140,4 +140,9 @@ class FrostJSI(val web: FrostWebView) { html ?: return header?.offer(html) } + + @JavascriptInterface + fun allowHorizontalScrolling(enable: Boolean) { + activity?.viewPager?.enableSwipe = enable + } } |