nativescript-android-toast
Toast Plugin for Nativescript Android Devices
npm i --save nativescript-android-toast
- Version: 0.3.0
- GitHub: https://github.com/iamabs2001/nativescript-android-toast
- NPM: https://www.npmjs.com/package/nativescript-android-toast
- Downloads:
- Last Day: 0
- Last Week: 0
- Last Month: 0
Nativescript Android Toast
Installation:
tns plugin add nativescript-android-toast
API (Methods)
MakeToast(text : String, duration : "long" or "short");
API (Properties)
Property | Type | Require | Description |
---|---|---|---|
text | String | Required | Text you want to toast |
duration | String | Optional | "long" or "short" duration |
Demo
Demo 1 | Demo 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