Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradmartin/nativescript-hold-to-load
Nativescript plugin for press (hold) background animation
https://github.com/bradmartin/nativescript-hold-to-load
android animation nativescript nativescript-plugin
Last synced: 10 days ago
JSON representation
Nativescript plugin for press (hold) background animation
- Host: GitHub
- URL: https://github.com/bradmartin/nativescript-hold-to-load
- Owner: bradmartin
- License: other
- Created: 2016-06-26T03:03:31.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-26T03:41:16.000Z (over 8 years ago)
- Last Synced: 2024-12-18T07:56:14.517Z (23 days ago)
- Topics: android, animation, nativescript, nativescript-plugin
- Language: TypeScript
- Size: 3.6 MB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![npm](https://img.shields.io/npm/v/nativescript-hold-to-load.svg)](https://www.npmjs.com/package/nativescript-hold-to-load)
[![npm](https://img.shields.io/npm/dt/nativescript-hold-to-load.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-hold-to-load)# NativeScript-Hold-To-Load
Nativescript plugin for press (hold) background animation.*Android Only*
## Sample
![Demo](./screens/demo.gif)
#### Native Library
[HoldToLoadLayout](https://github.com/melihaksoy/HoldToLoadLayout)## Installation
From your command prompt/termial go to your app's root folder and execute:`npm install nativescript-hold-to-load`
## Usage
#### XML:
```XML
```
## Attributes
**startColor - (color string)** - *required*Attribute to set the starting color.
**endColor - (color string)** - *optional*Attribute to set the ending color of the gradient, if not specified the startColor will be used.
**duration - (number)** - *optional*
Set duration of fill time in milliseconds. Default is 1500.
**strokeWidth - (number)** - *optional*
Sets the stroke width. Default is 0.**strokeAlpha - (number)** - *optional*
Sets the paint's alpha value. ** Value range is between 0 & 255. ** Default alpha value is 255.**playReverseAnimation - (boolean)** - *optional*
Sets if to animate the reverse animation. If set false, the loading will disappear instantly. Default is true.**stopWhenFilled - (boolean)** - *optional*
If set true, loading will stop when it's completed. If set false, loading will be reversed even if it is full. Default is true.**startAngle - (number)** - *optional*
Set the loading's starting point as angle. Default value is 270.