ActivityIndicator

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


  • Angular

  • Plain

  • React

  • Svelte

  • Vue

  • HTML

  • TypeScript

<ActivityIndicator [busy]="isBusy" (busyChange)="onBusyChanged($event)">
</ActivityIndicator>
import { ActivityIndicator } from '@nativescript/core'

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

  • TypeScript

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

onBusyChanged(args: EventData) {
  const indicator: ActivityIndicator = args.object
  console.log(`indicator.busy changed to: ${indicator.busy}`)
}
<activityIndicator busy={true} />
  • HTML

  • JavaScript

<activityIndicator busy="{true}" on:busyChange="{onBusyChanged}" />
export default {
  methods: {
    onBusyChanged(args) {
      const indicator = args.object // ActivityIndicator
      console.log(`indicator.busy changed to: ${indicator.busy}`)
    }
  }
}
  • HTML

  • JavaScript

<ActivityIndicator busy="true" @busyChange="onBusyChanged" />
export default {
  methods: {
    onBusyChanged(args) {
      const indicator = args.object // ActivityIndicator
      console.log(`indicator.busy changed to: ${indicator.busy}`)
    }
  }
}

Properties

Name Type Description

busy

Boolean

Gets or sets whether the indicator is active. When true, the indicator is active.

android

android.widget.ProgressBar

Gets the native android widget that represents the user interface for this component. Valid only when running on Android OS.

ios

UIActivityIndicatorView

Gets the native iOS UIActivityIndicatorView that represents the user interface for this component. Valid only when running on iOS.

...Inherited

Inherited

Additional inherited properties are not shown. Refer to the API Reference

Events

Name Description

busyChange

Emitted when the busy property is changed.