Preview 2.0 is now in Public Beta!
Read the Announcement
Note: You are on the beta version of our docs. This is a work in progress and may contain broken links and pages.

<ActivityIndicator> is a UI component that shows a progress indicator signaling to the user of an operation running in the background.


xml
<ActivityIndicator
  busy="{{ isBusy }}"
  busyChange="{{ onBusyChanged }}"
/>
ts
import { ActivityIndicator } from '@nativescript/core'

onBusyChanged(args: EventData) {
  const indicator: ActivityIndicator = args.object
  console.log(`indicator.busy changed to: ${indicator.busy}`)
}

Props

busy

xml
<ActivityIndicator busy="{{ isBusy }}"
/>
ts
export class HelloWorldModel extends Observable {
  isBusy = true
}

Gets or sets whether the indicator is active.


Inherited

For additional inherited properties,refer to the API Reference.

Events

busyChange

xml
<ActivityIndicator
  busyChange="{{ onBusyChanged }}"
/>
ts
export class HelloWorldModel extends Observable {
  onBusyChanged(args: EventData) {
    const indicator: ActivityIndicator = args.object as ActivityIndicator
    console.log(`indicator.busy changed to: ${indicator.busy}`)
  }
}

Emitted when the busy property is changed. Event data type: EventData.


Native component

AndroidiOS
android.widget.ProgressBar (indeterminate = true)UIActivityIndicatorView
Previous
ActionBar
Next
Button