1.0.2 • Published 8 years ago

nativescript-progressbar v1.0.2

Weekly downloads
8
License
Apache-2.0
Repository
github
Last release
8 years ago

NativeScript-ProgressBar

A set of XML widget to create native Progress Bars in NativeScript apps.

Installation

npm install nativescript-progressbar

Screenshot


Animated Progress Bars

Type of available Progress Bars

  • CircleProgressBar
  • CircleSegmentBar
  • ArcProgressBar
  • LineProgressBar

Usage

CircleProgressBar

<page xmlns:pb="nativescript-progressbar">
    <pb:CircleProgressBar
        progress="{{progress}}"
        text="{{message}}"
        textSize="50"
        widthProgressBackground="20"
        widthProgressBarLine="50"
        backgroundColor="red"
        progressColor="blue"
        linearGradient="false"
        width="200"
    />
</page>

CircleSegmentBar

<page xmlns:pb="nativescript-progressbar">
    <pb:CircleSegmentBar
        progress="{{progress}}"
        text="{{message}}"
        textSize="50"
        widthProgressBackground="20"
        widthProgressBarLine="50"
        backgroundColor="red"
        progressColor="blue"
        linearGradient="false"
        width="200"
    />
</page>

ArcProgressBar

Note that ArcProgressBar doesn't have linearGradient property

<page xmlns:pb="nativescript-progressbar">
    <pb:ArcProgressBar
        progress="{{progress}}"
        text="{{message}}"
        textSize="50"
        widthProgressBackground="20"
        widthProgressBarLine="50"
        backgroundColor="red"
        progressColor="blue"
        width="200"
    />
</page>

LineProgressBar

<page xmlns:pb="nativescript-progressbar">
    <pb:LineProgressBar
        progress="{{progress}}"
        text="{{message}}"
        textSize="50"
        widthProgressBackground="20"
        widthProgressBarLine="50"
        backgroundColor="red"
        progressColor="blue"
        linearGradient="false"
        width="200"
    />
</page>

Attributes

PropertyDescriptionValuesNotes
progressSets the progress valuenumber 0-100
textSets the text in the middle of the progress bartext
textSizeSets the size of the text color of the buttonnumber
widthProgressBackgroundSets the size of the progress backgroundnumber
widthProgressBarLineSets the size of the progress barnumber
backgroundColorSets the color of the progress backgroundcolor
progressColorSets the color of the progress barcolor
linearGradientSets the progress bar color to gradientbooleanNot available for ArcProgressBar

Android Notes