A simple library for creating animated warnings/dialogs/alerts for Android.

Overview

Noty

https://github.com/emre1512/Noty https://github.com/emre1512/Noty https://www.apache.org/licenses/LICENSE-2.0 https://github.com/emre1512/Noty

A simple library for creating animated warnings/notifications for Android.

Examples

Show me code Show me code Show me code

Show me code Show me code Show me code

Installation

  • Get it via gradle: compile 'com.emredavarci:noty:1.0.3'

Usage

Simplest

Noty.init(YourActivity.this, "Your warning message", yourLayout, Noty.WarningStyle.SIMPLE).show();

Simple with action

Noty.init(YourActivity.this, "Your warning message", yourLayout, 
	Noty.WarningStyle.ACTION)
	.setActionText("OK").show();

Some customization

Noty.init(YourActivity.this, "Your warning message", yourLayout,
        Noty.WarningStyle.ACTION)
        .setActionText("OK")
        .setWarningBoxBgColor("#ff5c33")
        .setWarningTappedColor("#ff704d")
        .setWarningBoxPosition(Noty.WarningPos.BOTTOM)
        .setAnimation(Noty.RevealAnim.FADE_IN, Noty.DismissAnim.BACK_TO_BOTTOM, 400,400)
        .show();     	

Add tap listener

Noty.init(YourActivity.this, "Your warning message", yourLayout,
        Noty.WarningStyle.SIMPLE)
        .setTapListener(new Noty.TapListener() {
            @Override
            public void onTap(Noty warning) {
                // do something...
            }
        }).show();

Add click listener

Noty.init(YourActivity.this, "Your warning message", yourLayout,
        Noty.WarningStyle.ACTION)
        .setClickListener(new Noty.ClickListener() {
            @Override
            public void onClick(Noty warning) {
                // do something...
            }
        }).show();

Add animation listener

Noty.init(YourActivity.this, "Your warning message", yourLayout,
        Noty.WarningStyle.ACTION)
        .setAnimationListener(new Noty.AnimListener() {
            @Override
            public void onRevealStart(Noty warning) {
                // Start of reveal animation
            }

            @Override
            public void onRevealEnd(Noty warning) {
               // End of reveal animation
            }

	    @Override
            public void onDismissStart(Noty warning) {
               // Start of dismiss animation
            }

            @Override
            public void onDismissEnd(Noty warning) {
               // End of dismiss animation
            }
        }).show();

Detailed Documentation

  • Detailed documentation can be found at Wiki.

LICENSE

Copyright 2017 M. Emre Davarci

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.

You might also like...
A simple file/ directory picker dialog for android
A simple file/ directory picker dialog for android

FileListerDialog FileListerDialog helps you to list and pick file/directory. Library is built for Android Getting Started Installing To use this libra

A highlight lib and also it can be a simple popup window lib for android
A highlight lib and also it can be a simple popup window lib for android

HighlightPro 中文 HighlightPro is a highlight library for android and also it can be a simple popup window library for android. Features: One or more hi

Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.

FancyGifDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ...

LicensesDialog is an open source library to display licenses of third-party libraries in an Android app.
LicensesDialog is an open source library to display licenses of third-party libraries in an Android app.

LicensesDialog LicensesDialog is an open source library to display licenses of third-party libraries in an Android app. Download Download the latest R

Android library to show
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

Android library that allows applications to add dialog-based slider widgets to their settings
Android library that allows applications to add dialog-based slider widgets to their settings

Android Slider Preference Library Overview Slider represents a float between 0.0 and 1.0 Access with SliderPreference.getValue() or SharedPreferences.

An Android library for displaying a dialog where it presents new features in the app.
An Android library for displaying a dialog where it presents new features in the app.

WhatIsNewDialog What is new dialog for Android is used for presenting new features in the the app. It can be used in the activity starts, from menu or

Android library to show
Android library to show "Rate this app" dialog

Android-RateThisApp Android-RateThisApp is an library to show "Rate this app" dialog. The library monitors the following status How many times is the

An easy-to-use Android library that will help you to take screenshots of specif views of your app and save them to external storage (Including API 29 Q+ with Scope Storage)

🇺🇸 English | 🇧🇷 Português (pt-br) 🇺🇸 English: An easy to use Library that will help you to take screenshots 📸 of the views in your app Step 1.

Comments
  • Warning appears after it's been dismissed on click

    Warning appears after it's been dismissed on click

    If I've dismissed the warning and I click over where it appeared, the warning shows up briefly (apparently for as long as the dismissTime), completely blocking whatever is underneath, no matter what ViewGroup I pass as parent layout or how long I wait after the warning has been dismissed.

    If I drop the dismissTime to 0, it no longer shows, but still blocks the buttons I have underneath. It doesn't matter how long the revealTime is.

    I'm creating the warning like this:

    Noty.init(context, mensaje,view, Noty.WarningStyle.ACTION) .setActionText("OK") .setHeight(new RelativeLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT)) .setWarningBoxMargins(40, 40, 40, 40) .setWarningBoxBgColor("#67B93D") .setWarningTextColor("#ffffff") .setActionTextColor("#ffffff") .setWarningTappedColor("#5FAC38") .setWarningBoxRadius(10, 10, 10, 10) .setWarningBoxPosition(Noty.WarningPos.CENTER) .setAnimation(Noty.RevealAnim.FADE_IN, Noty.DismissAnim.FADE_OUT, 0, 0) .show();

    This only happens after the warning has been shown correctly at least once. Noty-issue

    opened by MarianneRojasRobles 0
  • How to auto dismiss after a few seconds?

    How to auto dismiss after a few seconds?

    (...).setAnimation(RevealAnim reveal, DismissAnim dismiss, int revealTime, int dismissTime);

    Originally posted by @emre1512 in https://github.com/emre1512/Noty/issues/1#issuecomment-499334055

    .setAnimation(Noty.RevealAnim.SLIDE_DOWN, Noty.DismissAnim.BACK_TO_TOP, 400, 400)

    this is the default and doesnt auto dismiss. Why you close if you cannot answer?

    opened by Testator 2
Owner
Emre
Hobbyist Android App/Game Developer | Open Source Lover <3 | M.Sc.
Emre
📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.

Aesthetic Dialogs for Android ?? ?? Android Library for ?? fluid, ?? beautiful, ?? custom Dialogs. Table of Contents: Introduction Types of Dialog Dar

Gabriel TEKOMBO 538 Dec 14, 2022
😍 A beautiful, fluid, and extensible dialogs API for Kotlin & Android.

Material Dialogs View Releases and Changelogs Modules The core module is the fundamental module that you need in order to use this library. The others

Aidan Follestad 19.5k Dec 29, 2022
Backport of Material dialogs with easy-to-use API based on DialogFragment

StyledDialogs for Android Demo app: Features: Compatible with Material Design Guidelines Same look for Android 2.2+ Built on top of standard DialogFra

Avast 2.2k Dec 29, 2022
Backport of Material dialogs with easy-to-use API based on DialogFragment

StyledDialogs for Android Demo app: Features: Compatible with Material Design Guidelines Same look for Android 2.2+ Built on top of standard DialogFra

Avast 2.2k Nov 29, 2022
⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.

Sheets Sleek dialogs and bottom-sheets for quick use in your app. Choose one of the available sheets or build custom sheets on top of the existing fun

Maximilian Keppeler 838 Dec 30, 2022
Sleek dialogs and bottom-sheets for quick use in your app

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.

Maximilian Keppeler 835 Dec 25, 2022
Alert Dialog - You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment.

We show a warning message (Alert Dialog) to the user in many parts of our applications. You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment. Thanks to this extension, you can create a Dialog and call it in the Activity or Fragment you want and customize the component you want.

Gökmen Bayram 0 Jan 9, 2022
An Android library that provides a simple implementation of a DialogFragment

SimpleDialogFragment An Android library that provides a simple implementation of a DialogFragment. Are you tired of creating a new DialogFragment for

Julien Arzul 32 Oct 2, 2020
A simple library to show custom dialog with animation in android

SmartDialog A simple library to show custom dialog in android Step 1. Add the JitPack repository to your build file allprojects { repositories {

claudysoft 9 Aug 18, 2022
Extremely useful library to validate EditText inputs whether by using just the validator for your custom view or using library's extremely resizable & customisable dialog

Extremely useful library for validating EditText inputs whether by using just the validator (OtpinVerification) for your custom view or using library's extremely resizable & customisable dialog (OtpinDialogCreator)

Ehma Ugbogo 17 Oct 25, 2022