All Projects → Pulimet → Toaster-Library

Pulimet / Toaster-Library

Licence: other
🎫 Android library, Custom toast and dialog (2018)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Toaster-Library

Windowshowdemo
Android 弹窗案例总结(仿淘宝弹窗 咸鱼菜单 筛选列表)
Stars: ✭ 95 (+578.57%)
Mutual labels:  dialog, toast
Aiforms.dialogs
AiForms.Dialogs for Xamarin.Forms
Stars: ✭ 143 (+921.43%)
Mutual labels:  dialog, toast
Livesmashbar
An elegant looking and easy to use informative library with LiveData integration for Android.
Stars: ✭ 107 (+664.29%)
Mutual labels:  dialog, toast
Dialog
🔥空祖家的对话框工具
Stars: ✭ 658 (+4600%)
Mutual labels:  dialog, toast
Sweetalert2
A beautiful, responsive, highly customizable and accessible (WAI-ARIA) replacement for JavaScript's popup boxes. Zero dependencies.
Stars: ✭ 13,929 (+99392.86%)
Mutual labels:  dialog, toast
Sweet Alert
A BEAUTIFUL, RESPONSIVE, CUSTOMIZABLE, ACCESSIBLE (WAI-ARIA) REPLACEMENT FOR JAVASCRIPT'S POPUP BOXES FOR LARAVEL
Stars: ✭ 696 (+4871.43%)
Mutual labels:  dialog, toast
Noty
A simple library for creating animated warnings/dialogs/alerts for Android.
Stars: ✭ 136 (+871.43%)
Mutual labels:  dialog, toast
Androidproject
Android 技术中台,但愿人长久,搬砖不再有
Stars: ✭ 4,398 (+31314.29%)
Mutual labels:  dialog, toast
Flash
⚡️A highly customizable, powerful and easy-to-use alerting library for Flutter.
Stars: ✭ 174 (+1142.86%)
Mutual labels:  dialog, toast
Alerttoast
Create Apple-like alerts & toasts using SwiftUI
Stars: ✭ 151 (+978.57%)
Mutual labels:  dialog, toast
Xtoast
Android 悬浮窗框架,好用不解释
Stars: ✭ 493 (+3421.43%)
Mutual labels:  dialog, toast
Jh flutter demo
a flutter demo
Stars: ✭ 229 (+1535.71%)
Mutual labels:  dialog, toast
React Cool Portal
😎 🍒 React hook for Portals, which renders modals, dropdowns, tooltips etc. to <body> or else.
Stars: ✭ 458 (+3171.43%)
Mutual labels:  dialog, toast
Anylayer
Android稳定高效的浮层创建管理框架
Stars: ✭ 745 (+5221.43%)
Mutual labels:  dialog, toast
Smart Show
Toast & Snackbar & TopBar & Dialog
Stars: ✭ 430 (+2971.43%)
Mutual labels:  dialog, toast
V Dialogs
A simple and clean instructional dialog plugin for Vue2, dialog type including Modal, Alert, Mask and Toast
Stars: ✭ 121 (+764.29%)
Mutual labels:  dialog, toast
BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (+128.57%)
Mutual labels:  dialog, toast
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (+600%)
Mutual labels:  dialog, toast
Rxtool
Android开发人员不得不收集的工具类集合 | 支付宝支付 | 微信支付(统一下单) | 微信分享 | Zip4j压缩(支持分卷压缩与加密) | 一键集成UCrop选择圆形头像 | 一键集成二维码和条形码的扫描与生成 | 常用Dialog | WebView的封装可播放视频 | 仿斗鱼滑动验证码 | Toast封装 | 震动 | GPS | Location定位 | 图片缩放 | Exif 图片添加地理位置信息(经纬度) | 蛛网等级 | 颜色选择器 | ArcGis | VTPK | 编译运行一下说不定会找到惊喜
Stars: ✭ 11,567 (+82521.43%)
Mutual labels:  dialog, toast
Wc Messagebox
基于 Vue 2.0 开发的 Alert, Toast, Confirm 插件, UI仿照 iOS 原生
Stars: ✭ 203 (+1350%)
Mutual labels:  dialog, toast

Toaster-Library

Download License Android Arsenal

Toaster is android library that helps in showing toast and dialog.

Installation

  • Add the dependency from jCenter to your app's (not project) build.gradle file:
repositories {
    jcenter()
}

dependencies {
    compile 'net.alexandroid.utils:toaster:2.0.4'
}

Release notes

  • 2.0.3 - Inflater issue solved + bug fix
  • 2.0.1 - Added onOutOfTheBoundClick callBack, exposed isVisible() method, bug fix, animation time changes
  • 1.4 - Handle animation off issue (Thanks to @kamilj)
  • 1.3 - Custom toast layout support
  • 1.2 - Basic enhancements

How to use it

  • Toast:

 Toaster.showToast(this, "This is our awesome toast");
 // 300 - animation duration, 500 - visible duration
 Toaster.showToast(this, "This is our awesome toast", 300, 500);  
  • Custom layout for toast:
 Toaster.showToast(this, "This is our awesome toast", 300, 500, R.layout.custom_t);

https://github.com/Pulimet/Toaster-Library/blob/master/app/src/main/res/layout/custom_d.xml

  • Dialog:

private Toaster mToaster;
...
private void showDialog() {
    mToaster = new Toaster.Builder(this)
            .setTitle("Dialog title")
            .setText("Text of the dialog here")
            .setPositive("OK")
            .setNegative("CANCEL")
            .setAnimationDuration(300)
            .setCallBack(this).build();
    mToaster.show();
}  

@Override
public void onBackPressed() {
   if (mToaster == null || mToaster.onBackPressed()) {
       super.onBackPressed();
    }
}

// CallBack
@Override
public void onPositiveClick() {
    Log.d("TAG", "Positive");
}

@Override
public void onNegativeClick() {
    Log.d("TAG", "Negative");
}

@Override
public void onOutOfTheBoundClick() {
    Log.d("TAG", "onOutOfTheBoundClick");
    mToaster.hide();
}
  • Custom layout for dialog:

 mToaster = new Toaster.Builder(this)
.setCustomLayout(R.layout.custom)
...

https://github.com/Pulimet/Toaster-Library/blob/master/app/src/main/res/layout/custom_d.xml




License

Copyright 2018 Alexey Korolev

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].