Kivy for android in action: Web Service
|
Quick Review
|
. ├── 123.fa ├── 123.html ├── Karobben_logo_horizontal_800.png ├── LICENSE ├── Layout │ ├── Blog.kv │ ├── CV_cm.kv │ ├── CV_test.kv │ ├── Data_table.kv │ ├── Font.kv │ ├── Navigation_Draw.kv │ ├── Navigation_Tabs.kv │ ├── Seq.kv │ ├── editor.kv │ ├── filechooser.kv │ └── menu.kv ├── README.md ├── alipay.jpg ├── buildozer.spec ├── config │ ├── Navi.json │ └── home.json ├── custom_camera │ ├── __init__.py │ ├── custom_camera.kv │ └── custom_camera.py ├── demo │ ├── clustal │ └── echart ├── favicon.ico ├── font │ ├── ArtificialBox-WdD4.ttf │ ├── FangZhengHeiTiFanTi-1.ttf │ ├── FangZhengHeiTiJianTi-1.ttf │ ├── FangZhengKaiTiPinYinZiKu-1.ttf │ ├── FangzhenXiaozhuan.ttf │ ├── HuaKangXinZhuanTi-1.ttf │ ├── JingDianFanJiaoZhuan-1.ttf │ ├── heydings-controls-1.ttf │ ├── heydings-icons-1.ttf │ ├── heydings-icons-2.ttf │ └── icon-works-webfont-2.ttf ├── image_processing │ ├── __init__.py │ ├── cascades │ │ └── haarcascade_frontalface_default.xml │ └── image_processing.py ├── libWidget │ ├── Blog.py │ ├── CV_cm.py │ ├── CV_test.py │ ├── Data_table.py │ ├── Font.py │ ├── Seq.py │ ├── editor.py │ ├── filechooser.py │ ├── menu.py │ └── model.txt ├── libs │ ├── bio_seq.py │ ├── clustalo.py │ ├── clustalo.pytxt │ ├── web_open.py │ └── webview.py ├── logo.png ├── main.py └── wepay.png
Function for Close Tab
Because I was using my blog project to doing the test with this server, so I called it as Blog.py
Function run_sever
is for starting the http server so you can render CSS and applying js
, close_blog
could close the server and back to home directory.
|
Layout
Blog.py
|
Functions for webview
This function was written by RobertFlatt and published in RobertFlatt /Android-for-Python . He also contributed lots of other awesome functions and examples of widgets.
I copied his webview.py
to libs
directory. An example of using it:
if platform == "android":
from libs.webview import WebView
self.browser = None
self.browser = WebView(URL,
enable_javascript = True,
enable_downloads = True,
enable_zoom = True)
Kivy for android in action: Web Service
https://karobben.github.io/2021/05/10/Python/kivy-inaction-tb-7/