ActivityIndicator¶
A small animated indicator showing activity on a task of indeterminate length, usually rendered as a “spinner” animation.
Not supported
Not supported
Screenshot not available
Not supported
Usage¶
import toga
indicator = toga.ActivityIndicator()
# Start the animation
indicator.start()
# Stop the animation
indicator.stop()
Notes¶
The ActivityIndicator will always take up a fixed amount of physical space in a layout. However, the widget will not be visible when it is in a “stopped” state.
Reference¶
- class toga.ActivityIndicator(id=None, style=None, running=False)¶
Bases:
Widget
Create a new ActivityIndicator widget.
- Parameters:
- property enabled: Literal[True]¶
Is the widget currently enabled? i.e., can the user interact with the widget?
ActivityIndicator widgets cannot be disabled; this property will always return True; any attempt to modify it will be ignored.
- focus()¶
No-op; ActivityIndicator cannot accept input focus.
- Return type:
None
- property is_running: bool¶
Determine if the activity indicator is currently running.
Use
start()
andstop()
to change the running state.True if this activity indicator is running; False otherwise.
- start()¶
Start the activity indicator.
If the activity indicator is already started, this is a no-op.
- Return type:
None
- stop()¶
Stop the activity indicator.
If the activity indicator is already stopped, this is a no-op.
- Return type:
None