NativeScript - ActivityIndicator Posted on 2016-04-15 | In NativeScript loading 圈 busy show不show 宽高常用值 import {Component, ViewChild, ElementRef} from "angular2/core";import {Color} from "color";import {SearchBar} from "ui/search-bar";import {TextField} from "ui/text-field";import {Switch} from "ui/switch";import {Slider} from "ui/slider";import {Progress}from"ui/progress";import {PropertyChangeData} from "data/observable";@Component({ selector: "my-app", template: `<StackLayout orientation="vertical"> <ActivityIndicator style="color:red" [busy]="isLoading" ></ActivityIndicator><Button text="add" (tap)="btn()"></Button></StackLayout>`, styleUrls: ["app.css"]})export class AppComponent { isLoading: boolean = true; constructor() { } ngAfterViewInit() { } btn() { this.isLoading = !this.isLoading; }}