项目作者: sean-perkins

项目描述 :
NativeScript plugin for animated progress borders on circles.
高级语言: TypeScript
项目地址: git://github.com/sean-perkins/nativescript-animated-circle.git
创建时间: 2017-10-07T07:12:55Z
项目社区:https://github.com/sean-perkins/nativescript-animated-circle

开源协议:Apache License 2.0

下载


nativescript-animated-circle

npm
npm

NPM

Creates an animated circle (animates the border of the circle) on iOS and Android.

iOS Android

Installation

  1. tns plugin add nativescript-animated-circle

Usage

  1. <Page xmlns="http://schemas.nativescript.org/tns.xsd"
  2. xmlns:ui="nativescript-animated-circle">
  3. <ui:AnimatedCircle
  4. backgroundColor="transparent"
  5. width="200"
  6. height="200"
  7. animated="true"
  8. animateFrom="0"
  9. rimColor="#FF5722"
  10. barColor="#3D8FF4"
  11. fillColor="#eee"
  12. clockwise="true"
  13. rimWidth="5"
  14. progress="80"
  15. text="bam"
  16. textSize="28"
  17. textColor="red" ></ui:AnimatedCircle>
  18. </Page>

Angular

To use this plugin in Angular, please register the element above your AppModule declaration.

  1. import { registerElement } from 'nativescript-angular/element-registry'
  2. registerElement('AnimatedCircle', () => require('nativescript-animated-circle').AnimatedCircle);

Then you can leverage the plugin using <AnimatedCircle></AnimatedCircle> in your templates.

API

Property Default Description
rimColor #FF5722 The filled portion of the circle border’s color.
barColor #3D8FF4 The remaining (unfilled) portion of the circle border.
clockwise true The CW (true) or CCW (false) draw direction.
rimWidth 5 The border radius of the circle.
progress 0 The current progress value.
startAngle 0 The angle to start drawing from.
endAngle 100 iOS only the end angle to stop drawing at.
animated false Android only animation status.
animateFrom 0 Android only the progress value to animate from.
animationDuration 1000 Android only the duration to animate for.
text “” The text inside of the circle.
textSize 0 Text size, 0 will hide the text
textColor #ff0000 Text color

Available for Contract

Need velocity on your NativeScript projects? I’m available to build beautiful and performant NativeScript applications for your business requirements. Email me direct: sean@devonite.com to discuss project details.

License

Apache License Version 2.0, January 2004