npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-native-spinner

v1.1.4

Published

A Cordova plugin for showing a progress indicator based on Paldom/SpinnerDialog

Downloads

3,609

Readme

cordova-plugin-native-spinner

NPM version npm

Cordova plugin for showing a native spinner based on Paldom/SpinnerDialog

NPM Package: cordova-plugin-native-spinner

:fire: This Plugin is officially using in ionic-native :fire:

Platforms

| | | | | |:---:|:---:|:---:|:---:|:---:| | 4.1+ ✔ | 10+ ✔ | WP 8.1+ ✔ | 10+ ✔ | Browser ✔ |

Installation

Latest stable release:

  • PhoneGap - phonegap local plugin add cordova-plugin-spinner-dialog
  • Cordova - cordova plugin add cordova-plugin-spinner-dialog

Current state from git:

  • PhoneGap - phonegap local plugin add https://github.com/greybax/cordova-plugin-native-spinner
  • Cordova - cordova plugin add https://github.com/greybax/cordova-plugin-native-spinner
cordova plugin add cordova-plugin-native-spinner
cordova prepare

Includes PR's improvements from Paldom/SpinnerDialog:

Methods

  • SpinnerDialog.show
  • SpinnerDialog.hide

SpinnerDialog.show

SpinnerDialog.show([title], [message], [cancelCallback])
  • title: Spinner title (Android only). Optional. (String)
  • message: Spinner message. Optional. (String)
  • cancelCallback: Callback to invoke when spinner cancel event fired (tap or Android hardware back button event). If set, spinner dialog will be fixed, you should explicitly call SpinnerDialog.hide. Due to legacy reasons you can provide boolean value (true/false) to set spinner not cancelable. Optional, defaults to false. (Function/Boolean)

SpinnerDialog.hide

SpinnerDialog.hide([wpStatusbar]);
  • wpStatusbar: Indicates whether to keep the status bar visible. (Windows 10 Mobile only). If set to true, only the spinner will be hidden, the status bar will remain visible if it was already visible. Optional, defaults to false. (Boolean)

Usage

// Show spinner dialog
SpinnerDialog.show();

// Show spinner dialog with message
// Note: spinner dialog is cancelable by default
SpinnerDialog.show(null, "message");

// Set spinner dialog fixed
SpinnerDialog.show(null, null, true);

// Set spinner dialog fixed with callback
// Note: callback fires on tap events and Android hardware back button click event
SpinnerDialog.show(null, null, function () {console.log("callback");});

// Show spinner dialog with title and message (Android only)
SpinnerDialog.show("title", "message");

// Set spinner dialog fixed (cannot be canceled with screen touch or Android hardware button)
SpinnerDialog.show("title", "message", true);

// Overlay opacity and text color options (IOS only)
SpinnerDialog.show(null,"Message",true, {overlayOpacity: 0.35,  textColorRed: 1, textColorGreen: 1, textColorBlue: 1}); 

// Change only overlay opacity (IOS only)
SpinnerDialog.show(null,"Message",true,{overlayOpacity:0.70});

// Change only text color (IOS only)
SpinnerDialog.show(null,"message",true, { textColorRed: 0.1, textColorGreen: 0.1, textColorBlue: 1});

// Hide spinner dialog
SpinnerDialog.hide();

Quirks

  • Cordova 5.0 or higher is required for Windows 10 support.
  • Windows 10 Mobile or Windows Phone 8.1 is required as desktop doesn't support StatusBar.

Screenshots

Android

Browser

Plugin demo app

Demo app source code to test the plugin is available at the cordova-plugin-demos repository by Andrés Zsögön.

License

See "LICENSE". Based on https://github.com/Paldom/SpinnerDialog with lots of awesome improvements! :star: :tada: :rocket: :star: