Widget “ActivityIndicator”

Extends Widget

A widget representing a spinning indicator for indeterminate loading / processing time.

You can import this type like this:

import {ActivityIndicator} from 'tabris';

Or reference it directly form anywhere as “tabris.ActivityIndicator”. Android | iOS — | — ActivityIndicator on Android | ActivityIndicator on iOS



Type: Color

The color of the indicator.



Fired when the tintColor property has changed.

Event Parameters

  • target: this The widget the event was fired on.

  • value: Color The new value of tintColor.


import {ActivityIndicator, Button, ui} from 'tabris';

// Create the activity indicator centered in the page
let activityIndicator = new ActivityIndicator({
  centerX: 0,
  centerY: 0

// Create reload button
let reloadButton = new Button({
  centerX: 0, centerY: 0,
  text: 'Run Task'
}).on('select', () => executeLongRunningTask())

function executeLongRunningTask() {
  // Toggle visibility of elements
  activityIndicator.visible = true;
  reloadButton.visible = false;

  setTimeout(() => {
    // Async action is done
    activityIndicator.visible = false;
    reloadButton.visible = true;
  }, 2500);


See also