Create main.py
Browse files
main.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from kivy.app import App
|
| 2 |
+
from kivy.uix.boxlayout import BoxLayout
|
| 3 |
+
from kivy.lang import Builder
|
| 4 |
+
|
| 5 |
+
# It is necessary to import the webview for the buildozer to include it
|
| 6 |
+
from kivy.uix.webview import WebView
|
| 7 |
+
|
| 8 |
+
Builder.load_string("""
|
| 9 |
+
<WebViewLayout>:
|
| 10 |
+
orientation: 'vertical'
|
| 11 |
+
WebView:
|
| 12 |
+
id: webview
|
| 13 |
+
url: 'https://www.google.com' # Replace with your website URL
|
| 14 |
+
""")
|
| 15 |
+
|
| 16 |
+
class WebViewLayout(BoxLayout):
|
| 17 |
+
pass
|
| 18 |
+
|
| 19 |
+
class SiteToApkApp(App):
|
| 20 |
+
def build(self):
|
| 21 |
+
return WebViewLayout()
|
| 22 |
+
|
| 23 |
+
if __name__ == '__main__':
|
| 24 |
+
SiteToApkApp().run()
|