A NativeScript Toast Plugin for Android and iOS apps.
JavaScript Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
platforms/ios Use updated Pod Oct 9, 2016
samples/angular docs(sample): Update sample app Dec 12, 2016
.gitignore Adding sample app (#8) Oct 24, 2016
.npmignore
.travis.yml chore(build): Fix Travis Build Nov 17, 2016
CHANGELOG.md
Jenkinsfile
LICENSE
README.md
index.d.ts
package.json
showcase.png
toast.android.js Center-align text on Android Jan 3, 2017
toast.ios.js fix(#15): Fix ios call Nov 6, 2016

README.md

NativeScript Toast Plugin

Build Status npm version

A NativeScript Toast Plugin for Android and iOS apps.

NPM

What is a toast?

A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. - Android Developer

image

Demo

How to install and use this plugin? Watch it on YouTube!

Want simple example application to play with? nativescript-toast-example

Installation

Run the following command from the root of your project:

$ tns plugin add nativescript-toast

Or the develop version, which may not working completly:

$ tns plugin add nativescript-toast@next

Usage

var Toast = require("nativescript-toast");

// ...

var toast = Toast.makeText("Hello World");
toast.show();

Or via import:

import * as Toast from 'nativescript-toast';

// ...

var toast = Toast.makeText("Hello World");
toast.show();

It is also possible to chain the methods.

Toast.makeText("Hello World").show();

Pass "long" to the makeText function to show the toast a bit longer.

Toast.makeText("Hello World", "long").show();

npm version