ztk::android::app
Shows a screen, a navigation stack, or a tab screen over the whole Tk window of the app, in a window of its own.
Synopsis
ztk::android::app root ?OBJECT?
Arguments
| Name |
Type |
Default |
Meaning |
root OBJECT |
subcommand |
|
Shows the screen, the navigation stack, or the tab screen. Back goes back one screen of a navigation stack, the one of the selected tab of a tab screen. At the root screen, or for a screen with no stack, Back sends the app to the background. |
root |
subcommand |
|
Closes the window of the views and shows the Tk window again. The Tk widgets keep their state. |
Return value
An empty string.
Errors
| Error |
When |
"OBJECT" is not a screen, a navigation stack, or a tab screen |
The object is a control, or no TclOO object. |
unknown or ambiguous subcommand "SUB": must be root |
The subcommand is not root. |
| Platform |
Works |
| Windows |
No |
| macOS |
No |
| Linux, Wayland |
No |
| Linux, X11 |
No |
| Web |
No |
| iOS |
No: ztk::ios::app |
| Android |
Yes |
| Headless |
No: the namespace does not exist. |
Example
set screen [ztk::android::Screen new -title Hello]
$screen add label -text "A native screen."
ztk::android::app root $screen
See also