You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/components.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,3 +29,23 @@ class MainPage(pn.Page):
29
29
Notes:
30
30
-`pn.Page` stores the Android `Activity` so components like `pn.Button()` and `pn.Label()` can construct their native counterparts.
31
31
- If you construct views before the `Page` is created on Android, a runtime error will be raised because no `Context` is available.
32
+
33
+
## Core components (0.2.0)
34
+
35
+
Stabilized with contextless constructors on both platforms:
36
+
37
+
-`Page`
38
+
-`StackView`
39
+
-`Label`, `Button`
40
+
-`ImageView`
41
+
-`TextField`, `TextView`
42
+
-`Switch`
43
+
-`ProgressView`, `ActivityIndicatorView`
44
+
-`WebView`
45
+
46
+
APIs are intentionally small and grow progressively in later releases. Properties and setters are kept consistent where supported by both platforms.
47
+
48
+
## Platform detection and Android context
49
+
50
+
- Use `pythonnative.utils.IS_ANDROID` for platform checks when needed.
51
+
- On Android, `Page` records the current `Activity` so child views can acquire a `Context` implicitly. Constructing views before `Page` initialization will raise.
0 commit comments