0.3.0 • Published 3 years ago

nativescript-android-toast v0.3.0

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

Nativescript Android Toast

npm GitHub Build Status npm GitHub issues Status Twitter Follow

Installation:

tns plugin add nativescript-android-toast

API (Methods)

MakeToast(text : String, duration : "long" or "short");

API (Properties)

PropertyTypeRequireDescription
textStringRequiredText you want to toast
durationStringOptional"long" or "short" duration

Demo

Demo 1Demo 2
Demo 1Demo 2

Usage

TypeScript

import Toast from "nativescript-android-toast";

showToast() {
    Toast.MakeToast("Hello Typescript","short");
}
<Button text="click" (tap)="showToast();">

JavaScript

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

showToast() {
    Toast.MakeToast("Hello Javascript","long");
}

https://developer.android.com/reference/android/widget/Toast