-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path__init__.py
More file actions
54 lines (47 loc) · 1.02 KB
/
__init__.py
File metadata and controls
54 lines (47 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
"""PythonNative — declarative native UI for Android and iOS.
Public API::
import pythonnative as pn
class MainPage(pn.Page):
def __init__(self, native_instance):
super().__init__(native_instance)
self.state = {"count": 0}
def render(self):
return pn.Column(
pn.Text(f"Count: {self.state['count']}", font_size=24),
pn.Button("Increment", on_click=lambda: self.set_state(count=self.state["count"] + 1)),
spacing=12,
)
"""
__version__ = "0.5.0"
from .components import (
ActivityIndicator,
Button,
Column,
Image,
ProgressBar,
Row,
ScrollView,
Spacer,
Switch,
Text,
TextInput,
WebView,
)
from .element import Element
from .page import Page
__all__ = [
"ActivityIndicator",
"Button",
"Column",
"Element",
"Image",
"Page",
"ProgressBar",
"Row",
"ScrollView",
"Spacer",
"Switch",
"Text",
"TextInput",
"WebView",
]