├── .gitignore ├── .npmignore ├── LICENSE ├── README.md ├── awesome-loaders.android.ts ├── awesome-loaders.common.ts ├── awesome-loaders.d.ts ├── awesome-loaders.ios.ts ├── demo ├── app │ ├── App_Resources │ │ ├── Android │ │ │ ├── AndroidManifest.xml │ │ │ ├── app.gradle │ │ │ ├── drawable-hdpi │ │ │ │ └── icon.png │ │ │ ├── drawable-ldpi │ │ │ │ └── icon.png │ │ │ ├── drawable-mdpi │ │ │ │ └── icon.png │ │ │ └── drawable-nodpi │ │ │ │ └── splashscreen.9.png │ │ └── iOS │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-736h@3x.png │ │ │ ├── Default-Landscape-568h@2x.png │ │ │ ├── Default-Landscape-667h@2x.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Landscape@3x.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default.png │ │ │ ├── Default@2x.png │ │ │ ├── Icon-Small-50.png │ │ │ ├── Icon-Small-50@2x.png │ │ │ ├── Icon-Small.png │ │ │ ├── Icon-Small@2x.png │ │ │ ├── Info.plist │ │ │ ├── icon-40.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-60.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-72.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ ├── app.css │ ├── app.ts │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ └── package.json ├── package.json └── tsconfig.json ├── index.d.ts ├── package.json ├── platforms ├── android │ ├── AVLoadingIndicatorView-release.aar │ └── include.gradle └── ios │ └── Podfile ├── screenshots └── loading_indicator.gif └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.js 2 | *.js.map 3 | *.log 4 | demo/app/*.js 5 | demo/*.d.ts 6 | demo/platforms 7 | demo/node_modules 8 | node_modules -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | demo/ 2 | *.png 3 | *.log -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | nativescript-loadingindicator 4 | Copyright (c) 2016, Osei Fortune 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 10 | the Software, and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![npm](https://img.shields.io/npm/v/nativescript-awesome-loaders.svg)](https://www.npmjs.com/package/nativescript-awesome-loaders) 2 | [![npm](https://img.shields.io/npm/dt/nativescript-awesome-loaders.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-awesome-loaders) 3 | #Installation 4 | `tns plugin add nativescript-awesome-loaders` 5 | 6 | #Usage 7 | 8 | ```js 9 | import {AwesomeLoaders} from 'nativescript-awesome-loaders'; 10 | let al = new AwesomeLoaders(); 11 | ``` 12 | 13 | Set Width 14 | 15 | `al.width = 60` 16 | 17 | Set Height 18 | 19 | `al.height = 60` 20 | 21 | Set Indicator 22 | 23 | `al.indicator = "Pacman"` 24 | 25 | Set Indicator Color 26 | 27 | `al.indicatorColor= "#FFEB3B"` 28 | 29 | TypeScript 30 | ```ts 31 | import {AwesomeLoaders} from 'nativescript-awesome-loaders'; 32 | 33 | let li = new AwesomeLoaders(); 34 | al.width = 60; 35 | al.height = 60; 36 | al.indicator = "SemiCircleSpin"; 37 | al.indicatorColor= "black"; 38 | ``` 39 | 40 | JavaScript 41 | ```js 42 | var AwesomeLoaders = require('nativescript-awesome-loaders').AwesomeLoaders; 43 | let li = new AwesomeLoaders(); 44 | al.width = 60; 45 | al.height = 60; 46 | al.indicator = "SemiCircleSpin"; 47 | al.indicatorColor= "black"; 48 | ``` 49 | 50 | 51 | 52 | ###Xml markup settings 53 | 54 | IMPORTANT: Make sure you include xmlns:al="nativescript-awesome-loaders" on the Page element 55 | 56 | e.g 57 | ` ` 58 | 59 | ##Screenshot 60 | 61 | ![ss](screenshots/loading_indicator.gif?raw=true) 62 | 63 | 64 | ##Indicators 65 | 66 | As seen above in the Screenshot, the indicators are as follows: 67 | 68 | **Row 1** 69 | * `BallPulse` 70 | * `BallGridPulse` 71 | * `BallClipRotate` 72 | * `BallClipRotatePulse` 73 | 74 | **Row 2** 75 | * `SquareSpin` 76 | * `BallClipRotateMultiple` 77 | * `BallPulseRise` 78 | * `BallRotate` 79 | 80 | **Row 3** 81 | * `CubeTransition` 82 | * `BallZigZag` 83 | * `BallZigZagDeflect` 84 | * `BallTrianglePath` 85 | 86 | **Row 4** 87 | * `BallScale` 88 | * `LineScale` 89 | * `LineScaleParty` 90 | * `BallScaleMultiple` 91 | 92 | **Row 5** 93 | * `BallPulseSync` 94 | * `BallBeat` 95 | * `LineScalePulseOut` 96 | * `LineScalePulseOutRapid` 97 | 98 | **Row 6** 99 | * `BallScaleRipple` 100 | * `BallScaleRippleMultiple` 101 | * `BallSpinFadeLoader` 102 | * `LineSpinFadeLoader` 103 | 104 | **Row 7** 105 | * `TriangleSkewSpin` 106 | * `Pacman` 107 | * `BallGridBeat` 108 | * `SemiCircleSpin` 109 | -------------------------------------------------------------------------------- /awesome-loaders.android.ts: -------------------------------------------------------------------------------- 1 | import { AwesomeLoaders as Root, indicatorProperty, indicatorColorProperty } from "./awesome-loaders.common"; 2 | import { Color } from 'color'; 3 | 4 | declare var com: any; 5 | 6 | export class AwesomeLoaders extends Root { 7 | private _android; /* com.wang.avi.AVLoadingIndicatorView */ 8 | 9 | get android() /* com.wang.avi.AVLoadingIndicatorView */ { 10 | return this.nativeView; 11 | } 12 | 13 | public createNativeView() { 14 | if (!this.indicator) return; 15 | this._android = new com.wang.avi.AVLoadingIndicatorView(this._context); 16 | return this._android; 17 | } 18 | 19 | [indicatorProperty.setNative](indicator: string) { 20 | if (!indicator) return; 21 | switch (indicator) { 22 | case 'BallPulse': 23 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallPulseIndicator()); 24 | break; 25 | case 'BallGridPulse': 26 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallGridPulseIndicator()); 27 | break; 28 | case 'BallClipRotate': 29 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallClipRotateIndicator()); 30 | break; 31 | case 'BallClipRotatePulse': 32 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallClipRotatePulseIndicator()); 33 | break; 34 | case 'SquareSpin': 35 | this.nativeView.setIndicator(new com.wang.avi.indicator.SquareSpinIndicator()); 36 | break; 37 | case 'BallClipRotateMultiple': 38 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallClipRotateMultipleIndicator()); 39 | break; 40 | case 'BallPulseRise': 41 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallPulseRiseIndicator()); 42 | break; 43 | case 'BallRotate': 44 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallRotateIndicator()); 45 | break; 46 | case 'CubeTransition': 47 | this.nativeView.setIndicator(new com.wang.avi.indicator.CubeTransitionIndicator()); 48 | break; 49 | case 'BallZigZag': 50 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallZigZagIndicator()); 51 | break; 52 | case 'BallZigZagDeflect': 53 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallZigZagDeflectIndicator()); 54 | break; 55 | case 'BallTrianglePath': 56 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallTrianglePathIndicator()); 57 | break; 58 | case 'BallScale': 59 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallScaleIndicator()); 60 | break; 61 | case 'LineScale': 62 | this.nativeView.setIndicator(new com.wang.avi.indicator.LineScaleIndicator()); 63 | break; 64 | case 'LineScaleParty': 65 | this.nativeView.setIndicator(new com.wang.avi.indicator.LineScalePartyIndicator()); 66 | break; 67 | case 'BallScaleMultiple': 68 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallScaleMultipleIndicator()); 69 | break; 70 | case 'BallPulseSync': 71 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallPulseSyncIndicator()); 72 | break; 73 | case 'BallBeat': 74 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallBeatIndicator()); 75 | break; 76 | case 'LineScalePulseOut': 77 | this.nativeView.setIndicator(new com.wang.avi.indicator.LineScalePulseOutIndicator()); 78 | break; 79 | case 'LineScalePulseOutRapid': 80 | this.nativeView.setIndicator(new com.wang.avi.indicator.LineScalePulseOutRapidIndicator()); 81 | break; 82 | case 'BallScaleRipple': 83 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallScaleRippleIndicator()); 84 | break; 85 | case 'BallScaleRippleMultiple': 86 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallScaleRippleMultipleIndicator()); 87 | break; 88 | case 'BallSpinFadeLoader': 89 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallSpinFadeLoaderIndicator()); 90 | break; 91 | case 'LineSpinFadeLoader': 92 | this.nativeView.setIndicator(new com.wang.avi.indicator.LineSpinFadeLoaderIndicator()); 93 | break; 94 | case 'TriangleSkewSpin': 95 | this.nativeView.setIndicator(new com.wang.avi.indicator.TriangleSkewSpinIndicator()); 96 | break; 97 | case 'Pacman': 98 | this.nativeView.setIndicator(new com.wang.avi.indicator.PacmanIndicator()); 99 | break; 100 | case 'BallGridBeat': 101 | this.nativeView.setIndicator(new com.wang.avi.indicator.BallGridBeatIndicator()); 102 | break; 103 | case 'SemiCircleSpin': 104 | this.nativeView.setIndicator(new com.wang.avi.indicator.SemiCircleSpinIndicator()); 105 | break; 106 | } 107 | } 108 | 109 | [indicatorColorProperty.setNative](color: Color) { 110 | if (color) { 111 | this.nativeView.setColor(color.android); 112 | } 113 | } 114 | 115 | public disposeNativeView() { 116 | this._android = undefined; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /awesome-loaders.common.ts: -------------------------------------------------------------------------------- 1 | import { View } from 'ui/core/view'; 2 | import { Property } from "ui/core/properties"; 3 | import { Color } from "color"; 4 | 5 | export class AwesomeLoaders extends View { 6 | protected indicator: string = null; 7 | } 8 | 9 | export const indicatorProperty = new Property({ 10 | name: "indicator", 11 | defaultValue: null 12 | }); 13 | indicatorProperty.register(AwesomeLoaders); 14 | 15 | 16 | export const indicatorColorProperty = new Property({ 17 | name: "indicatorColor", 18 | equalityComparer: Color.equals, 19 | defaultValue: null, 20 | valueConverter: v => new Color(v) 21 | }); 22 | indicatorColorProperty.register(AwesomeLoaders); 23 | -------------------------------------------------------------------------------- /awesome-loaders.d.ts: -------------------------------------------------------------------------------- 1 | import * as view from 'ui/core/view'; 2 | export declare class AwesomeLoaders extends view.View { 3 | indicator: string; 4 | indicatorColor: string; 5 | } 6 | -------------------------------------------------------------------------------- /awesome-loaders.ios.ts: -------------------------------------------------------------------------------- 1 | import { AwesomeLoaders as Root } from './awesome-loaders.common'; 2 | 3 | export class AwesomeLoaders extends Root { 4 | 5 | } -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/Android/drawable-nodpi/splashscreen.9.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-568h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-667h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-736h@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Landscape-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Landscape-568h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Landscape-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Landscape-667h@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Landscape.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Landscape@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Landscape@3x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Portrait.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default-Portrait@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Default@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Icon-Small-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Icon-Small-50.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Icon-Small-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Icon-Small-50@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Icon-Small.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/Icon-Small@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-40.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-40@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-60.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-60@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-72.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-72@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-76.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon-76@2x.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon.png -------------------------------------------------------------------------------- /demo/app/App_Resources/iOS/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/demo/app/App_Resources/iOS/icon@2x.png -------------------------------------------------------------------------------- /demo/app/app.css: -------------------------------------------------------------------------------- 1 | Page{ 2 | background-color: blue; 3 | } -------------------------------------------------------------------------------- /demo/app/app.ts: -------------------------------------------------------------------------------- 1 | import * as application from 'application'; 2 | application.start({ moduleName: 'main-page' }); 3 | -------------------------------------------------------------------------------- /demo/app/main-page.ts: -------------------------------------------------------------------------------- 1 | import * as observable from 'data/observable'; 2 | import * as pages from 'ui/page'; 3 | import {HelloWorldModel} from './main-view-model'; 4 | import {AwesomeLoaders} from 'nativescript-awesome-loaders'; 5 | // Event handler for Page "loaded" event attached in main-page.xml 6 | export function pageLoaded(args: observable.EventData) { 7 | // Get the event sender 8 | var page = args.object; 9 | page.bindingContext = new HelloWorldModel(); 10 | let gl = page.getViewById('gl'); 11 | let li = new AwesomeLoaders(); 12 | li.width = 60; 13 | li.height = 60; 14 | li.indicator = "SemiCircleSpin"; 15 | li.indicatorColor= "black"; 16 | gl._addView(li); 17 | } -------------------------------------------------------------------------------- /demo/app/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /demo/app/main-view-model.ts: -------------------------------------------------------------------------------- 1 | import {Observable} from 'data/observable'; 2 | 3 | export class HelloWorldModel extends Observable { 4 | 5 | constructor() { 6 | super(); 7 | } 8 | } -------------------------------------------------------------------------------- /demo/app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tns-template-hello-world-ts", 3 | "main": "app.js", 4 | "version": "1.6.0", 5 | "author": { 6 | "name": "Telerik", 7 | "email": "support@telerik.com" 8 | }, 9 | "description": "Nativescript hello-world-ts project template", 10 | "license": "Apache-2.0", 11 | "keywords": [ 12 | "telerik", 13 | "mobile", 14 | "nativescript", 15 | "{N}", 16 | "tns", 17 | "appbuilder", 18 | "template" 19 | ], 20 | "repository": { 21 | "type": "git", 22 | "url": "git+ssh://git@github.com/NativeScript/template-hello-world-ts.git" 23 | }, 24 | "bugs": { 25 | "url": "https://github.com/NativeScript/template-hello-world-ts/issues" 26 | }, 27 | "homepage": "https://github.com/NativeScript/template-hello-world-ts", 28 | "android": { 29 | "v8Flags": "--expose_gc" 30 | }, 31 | "devDependencies": { 32 | "nativescript-dev-typescript": "^0.3.0" 33 | }, 34 | "_id": "tns-template-hello-world-ts@1.6.0", 35 | "_shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8", 36 | "_resolved": "https://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz", 37 | "_from": "tns-template-hello-world-ts@latest", 38 | "scripts": {}, 39 | "_npmVersion": "2.14.7", 40 | "_nodeVersion": "4.2.2", 41 | "_npmUser": { 42 | "name": "enchev", 43 | "email": "vladimir.enchev@gmail.com" 44 | }, 45 | "dist": { 46 | "shasum": "a567c2b9a56024818c06596dab9629d155c5b8a8", 47 | "tarball": "http://registry.npmjs.org/tns-template-hello-world-ts/-/tns-template-hello-world-ts-1.6.0.tgz" 48 | }, 49 | "maintainers": [ 50 | { 51 | "name": "enchev", 52 | "email": "vladimir.enchev@gmail.com" 53 | }, 54 | { 55 | "name": "erjangavalji", 56 | "email": "erjan.gavalji@gmail.com" 57 | }, 58 | { 59 | "name": "fatme", 60 | "email": "hfatme@gmail.com" 61 | }, 62 | { 63 | "name": "hdeshev", 64 | "email": "hristo@deshev.com" 65 | }, 66 | { 67 | "name": "kerezov", 68 | "email": "d.kerezov@gmail.com" 69 | }, 70 | { 71 | "name": "ligaz", 72 | "email": "stefan.dobrev@gmail.com" 73 | }, 74 | { 75 | "name": "nsndeck", 76 | "email": "nedyalko.nikolov@telerik.com" 77 | }, 78 | { 79 | "name": "rosen-vladimirov", 80 | "email": "rosen.vladimirov.91@gmail.com" 81 | }, 82 | { 83 | "name": "sdobrev", 84 | "email": "stefan.dobrev@gmail.com" 85 | }, 86 | { 87 | "name": "tailsu", 88 | "email": "tailsu@gmail.com" 89 | }, 90 | { 91 | "name": "teobugslayer", 92 | "email": "teobugslayer@gmail.com" 93 | }, 94 | { 95 | "name": "valio.stoychev", 96 | "email": "valio.stoychev@gmail.com" 97 | } 98 | ], 99 | "_npmOperationalInternal": { 100 | "host": "packages-5-east.internal.npmjs.com", 101 | "tmp": "tmp/tns-template-hello-world-ts-1.6.0.tgz_1455717516189_0.6427943941671401" 102 | }, 103 | "directories": {}, 104 | "readme": "ERROR: No README data found!" 105 | } 106 | -------------------------------------------------------------------------------- /demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "nativescript": { 3 | "id": "org.nativescript.demo", 4 | "tns-android": { 5 | "version": "3.2.0" 6 | }, 7 | "tns-ios": { 8 | "version": "3.2.0" 9 | } 10 | }, 11 | "dependencies": { 12 | "nativescript-awesome-loaders": "file:///Users/apple/Desktop/NS/nativescript-awesome-loaders", 13 | "tns-core-modules": "^3.2.0" 14 | }, 15 | "devDependencies": { 16 | "babel-traverse": "6.25.0", 17 | "babel-types": "6.25.0", 18 | "babylon": "6.17.3", 19 | "lazy": "1.0.11", 20 | "nativescript-dev-typescript": "^0.5.0", 21 | "typescript": "~2.4.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /demo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "experimentalDecorators": true, 6 | "noEmitHelpers": true, 7 | "lib": [ 8 | "es6", 9 | "dom" 10 | ], 11 | "baseUrl": ".", 12 | "paths": { 13 | "*": [ 14 | "./node_modules/tns-core-modules/*", 15 | "./node_modules/*" 16 | ] 17 | } 18 | }, 19 | "exclude": [ 20 | "node_modules", 21 | "platforms" 22 | ] 23 | } -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './awesome-loaders' -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-awesome-loaders", 3 | "version": "1.2.1", 4 | "description": "NativeScript plugin to add custom loading indicators", 5 | "main": "awesome-loaders.js", 6 | "nativescript": { 7 | "platforms": { 8 | "android": "3.2.0" 9 | } 10 | }, 11 | "scripts": { 12 | "build": "tsc", 13 | "demo.ios": "npm run preparedemo ;cd demo ;tns emulate ios", 14 | "demo.android": "npm run preparedemo ;cd demo ;tns run android", 15 | "preparedemo": "npm run build ;cd demo ;tns plugin remove nativescript-awesome-loaders ;tns plugin add .. ;tns install", 16 | "setup": "cd demo ;npm install ;cd .. ;npm run build ;cd demo ;tns plugin add .. ;cd .." 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "https://github.com/triniwiz/nativescript-awesome-loaders.git" 21 | }, 22 | "keywords": [ 23 | "NativeScript", 24 | "JavaScript", 25 | "Android" 26 | ], 27 | "author": { 28 | "name": "Osei Fortune", 29 | "email": "fortune.osei@yahoo.com" 30 | }, 31 | "bugs": { 32 | "url": "https://github.com/triniwiz/nativescript-awesome-loaders/issues" 33 | }, 34 | "license": "MIT", 35 | "homepage": "https://github.com/triniwiz/nativescript-awesome-loaders", 36 | "readmeFilename": "README.md", 37 | "dependencies": { 38 | "tns-core-modules": "^3.2.0" 39 | }, 40 | "devDependencies": { 41 | "typescript": "~2.4.2" 42 | } 43 | } -------------------------------------------------------------------------------- /platforms/android/AVLoadingIndicatorView-release.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/platforms/android/AVLoadingIndicatorView-release.aar -------------------------------------------------------------------------------- /platforms/android/include.gradle: -------------------------------------------------------------------------------- 1 | android { 2 | productFlavors { 3 | "nativescriptawesomeloaders" { 4 | dimension "nativescriptawesomeloaders" 5 | } 6 | } 7 | } 8 | dependencies { 9 | compile 'com.nineoldandroids:library:2.4.0' 10 | } -------------------------------------------------------------------------------- /platforms/ios/Podfile: -------------------------------------------------------------------------------- 1 | pod 'DGActivityIndicatorView' -------------------------------------------------------------------------------- /screenshots/loading_indicator.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/triniwiz/nativescript-awesome-loaders/4d30a3108ae849a9a4f34cf6025f97607bcb1867/screenshots/loading_indicator.gif -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "target": "es5", 5 | "allowSyntheticDefaultImports": true, 6 | "experimentalDecorators": true, 7 | "emitDecoratorMetadata": true, 8 | "noEmitHelpers": true, 9 | "noEmitOnError": true, 10 | "skipLibCheck": true, 11 | "lib": [ 12 | "es6", 13 | "dom", 14 | "es2015.iterable" 15 | ], 16 | "baseUrl": ".", 17 | "paths": { 18 | "*": [ 19 | "./node_modules/tns-core-modules/*", 20 | "./node_modules/*" 21 | ] 22 | } 23 | }, 24 | "files": [ 25 | // "demo/node_modules/tns-core-modules/tns-core-modules.d.ts", 26 | "awesome-loaders.common.ts", 27 | "awesome-loaders.android.ts", 28 | "awesome-loaders.ios.ts" 29 | ], 30 | "exclude": [ 31 | "node_modules", 32 | "platforms", 33 | "**/*.aot.ts", 34 | "**/*.spec.ts" 35 | ], 36 | "compileOnSave": false 37 | } --------------------------------------------------------------------------------