nativescript-material-activityindicator
by farfromrefuge | v3.3.2
Material ActivityIndicator component
npm i --save nativescript-material-activityindicator

npm npm GitHub forks GitHub stars

Installation

If using @nativescript :

  • tns plugin add nativescript-material-activityindicator

If using tns-core-modules

Be sure to run a new build after adding plugins to avoid any issues.


Material Design Spec

Usage

Plain NativeScript

IMPORTANT: Make sure you include xmlns:mda="nativescript-material-activityindicator" on the Page element

XML

<Page xmlns:mda="nativescript-material-activityindicator">
<StackLayout horizontalAlignment="center">
<mda:ActivityIndicator busy="true"/>
</StackLayout>
</Page>

CSS

mdcactivityindicator {
color: #fff;
}

NativeScript + Angular

import { NativeScriptMaterialActivityIndicatorModule } from "nativescript-material-activityindicator/angular";

@NgModule({
imports: [
NativeScriptMaterialActivityIndicatorModule,
...
],
...
})
<MDActivityIndicator busy="true"></MDActivityIndicator>

NativeScript + Vue

import Vue from 'nativescript-vue';
import ActivityIndicatorPlugin from 'nativescript-material-activityindicator/vue';

Vue.use(ActivityIndicatorPlugin);
<MDActivityIndicator busy="true"/>

Attributes

Inherite from Nativescript Activity Indicator so it already has all the same attributes