Socket
Socket
Sign inDemoInstall

nativescript-loading-indicator-new

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    nativescript-loading-indicator-new

A NativeScript plugin for showing an overlayed loading indicator.


Version published
Maintainers
1
Install size
16.3 kB
Created

Readme

Source

nativescript-loading-indicator-new

Note: this plugin is not being actively maintained.

nativescript-loading-indicator-new is a plugin for NativeScript which overlays a loading indicator on the current page. Can be used, for example, to prevent the UI being interacted with while data is being fetched from an API, while informing the user that something is happening.

Under the hood, we use MBProgressHUD on iOS, and ProgressDialog on Android.

Installation

tns plugin add nativescript-loading-indicator-new

Example

var LoadingIndicator = require("nativescript-loading-indicator-new").LoadingIndicator;

// or with TypeScript:
// import {LoadingIndicator} from "nativescript-loading-indicator-new";

var loader = new LoadingIndicator();

// optional options
// android and ios have some platform specific options
var options = {
  message: 'Loading...',
  progress: 0.65,
  android: {
    indeterminate: true,
    cancelable: false,
    max: 100,
    progressNumberFormat: "%1d/%2d",
    progressPercentFormat: 0.53,
    progressStyle: 1,
    secondaryProgress: 1
  },
  ios: {
    details: "Additional detail note!",
    square: false,
    margin: 10,
    dimBackground: true,
    color: "#4B9ED6",
    mode: // see iOS specific options below
  }
};

loader.show(options); // options is optional

// Do whatever it is you want to do while the loader is showing, then

loader.hide();

Options

  • message: string Your message!
  • progress: number Set progress display
Android Specific
iOS Specific

Quick Mode Reference:

  • MBProgressHUDModeDeterminate
  • MBProgressHUDModeAnnularDeterminate
  • MBProgressHUDModeDeterminateHorizontalBar
  • MBProgressHUDModeText
  • MBProgressHUDModeCustomView
    • use with customView: string - local path to an image file

Screenshots

Loading indicator on iOS Loading indicator on Android

Keywords

FAQs

Last updated on 09 Aug 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc