Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/iamabs2001/nativescript-android-toast

Toast Plugin for Nativescript Android Devices
https://github.com/iamabs2001/nativescript-android-toast

android nativescript nativescript-android-toast nativescript-toast plugin showtoast toast

Last synced: 1 day ago
JSON representation

Toast Plugin for Nativescript Android Devices

Awesome Lists containing this project

README

        

# Nativescript Android Toast

![npm](https://img.shields.io/npm/v/nativescript-android-toast?color=blue)
![GitHub](https://img.shields.io/github/license/iamabs2001/nativescript-android-toast)
[![Build Status](https://travis-ci.com/iamabs2001/nativescript-android-toast.svg?branch=master)](https://travis-ci.com/iamabs2001/nativescript-android-toast)
![npm](https://img.shields.io/npm/dt/nativescript-android-toast)
![GitHub issues](https://img.shields.io/github/issues-raw/iamabs2001/nativescript-android-toast)
![Status](https://img.shields.io/badge/status-working-green)
![Twitter Follow](https://img.shields.io/twitter/follow/iamabs2001?style=social)

## Installation:
``` tns plugin add nativescript-android-toast ```


## API (Methods)

```javascript
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 |
| ----------- | ----------- |
| ![Demo 1](1.png) | ![Demo 2](2.png) |


## Usage

### TypeScript

```typescript
import Toast from "nativescript-android-toast";

showToast() {
Toast.MakeToast("Hello Typescript","short");
}
```


```html

```


### JavaScript

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

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


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