0.3.0 • Published 5 years ago
nativescript-android-toast v0.3.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

