Activity Indicator#

Availability (Key)#

macOS

GTK

Windows

iOS

Android

Web

The activity indicator is a (spinning) animation for showing progress in an indeterminate task.

Usage#

import toga

spinner = toga.ActivityIndicator()

# make widget visible and start animation
spinner.start()

Reference#

class toga.widgets.activityindicator.ActivityIndicator(id=None, style=None, running=False, factory=None)#
Parameters:
  • id (str) – An identifier for this widget.

  • style (Style) – An optional style object. If no style is provided then a new one will be created for the widget.

  • running (bool) – Set the initial running mode. Defaults to False

  • hide_when_stopped (bool) – Hide the indicator when not running. Defaults to True.

property is_running#

Use start() and stop() to change the running state.

Returns:

True if this activity indicator is running False otherwise

start()#

Start this activity indicator.

stop()#

Stop this activity indicator (if not already stopped).