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...
Android Real Time Chat & Messaging SDK
Android Real Time Chat & Messaging SDK

Android Chat SDK Overview Applozic brings real-time engagement with chat, video, and voice to your web, mobile, and conversational apps. We power emer

Kommunicate.io Android Chat SDK for Customer Support
Kommunicate.io Android Chat SDK for Customer Support

Kommunicate Android Chat SDK for Customer Support An Open Source Android Live Chat SDK for Customer Support Overview Kommunicate provides open source

Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.
Android has a built in microphone through which you can capture audio and store it , or play it in your phone. There are many ways to do that but with this dialog you can do all thats with only one dialog.

# Media Recorder Dialog ![](https://img.shields.io/badge/Platform-Android-brightgreen.svg) ![](https://img.shields.io/badge/Android-CustomView-blue.sv

Conversations is an open source XMPP/Jabber client for Android
Conversations is an open source XMPP/Jabber client for Android

Conversations Conversations: the very last word in instant messaging Design principles Be as beautiful and easy to use as possible without sacrificing

Email-based instant messaging for Android.
Email-based instant messaging for Android.

Delta Chat Android Client This is the Android client for Delta Chat. It is available on F-Droid and the Google Play Store. The APK can also be downloa

A glossy Matrix collaboration client for Android.
A glossy Matrix collaboration client for Android.

Element Android Element Android is an Android Matrix Client provided by Element. It is a total rewrite of Riot-Android with a new user experience. Nig

The most beautiful SMS messenger for Android
The most beautiful SMS messenger for Android

QKSMS QKSMS is an open source replacement to the stock messaging app on Android. It is currently available on the Google Play Store and on F-Droid Rep

Unofficial, FOSS-friendly fork of the original Telegram client for Android

or 1McafEgMvqAVujNLtcJumZHxp2UfaNByqs Telegram-FOSS Telegram is a messaging app with a focus on speed and security. It’s superfast, simple and free. T

Official Android client for the Kontalk messaging system

This is the official Android client for the Kontalk messaging system. It always implements the latest protocol.

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
NotiNotes - A simple Notes app for Android which only lives in your QS and notification panel

NotiNotes The Notes app for your notification panel. A simple Notes app for Andr

Yann 25 Dec 11, 2022
A simple real-time chatting application using android

In this project we have created a simple real-time chatting application using android. In this project we can chat with a registered user in the app. We can also set profile photo, about, name. After chatting with registered user we can also logout from the app and we can login, whenever we want .

Shankar Karande 3 Sep 26, 2022
Qiscus provide everything you need to power up your app with chats. And it's now made simple.

Introduction Qiscus Chat SDK (Software Development Kit) is a product provided by Qiscus that enables you to embed an in-app chat/chat feature in your

Qiscus - Multichannel Conversational Platform 197 Dec 27, 2022
Signal is a messaging app for simple private communication with friends.

Signal Android Signal is a messaging app for simple private communication with friends. Signal uses your phone's data connection (WiFi/3G/4G) to commu

Signal 23.2k Dec 28, 2022
Jitsi Meet - Secure, Simple and Scalable Video Conferences

Jitsi Meet is an open-source (Apache) WebRTC JavaScript application that uses Jitsi Videobridge to provide high quality, secure and scalable video conferences.

Jitsi 19.1k Jan 2, 2023
Simple telegram cat-captcha bot

kotlin-project-template Project Template for convenient project setup. Motivation Every time I create a new project, I do a lot of routine work, so th

Alex Sokol 15 Nov 16, 2022
Simple chat box written in kotlin, requires a redis server

Chat Box A simple chat box written in kotlin which requires a redis server to be used. Features Command Support Online User storage in Redis Easy to u

GrowlyX 2 Jul 17, 2022
A simple video calling application uses Firebase database and WebRTC API that enables you Peer-to-Peer Full-HD video and audio connection.

A simple video calling application uses Firebase database and WebRTC API that enables you Peer-to-Peer Full-HD video and audio connection.

Indrajit Sahu 10 Sep 27, 2022
Chat App is built to demonstrate a simple end-to-end chat encryption using RSA and AES algorithms

End-to-End Encrypted Chat ?? Chat App is built to demonstrate a simple end-to-end chat encryption using RSA and AES algorithms Built With ⚒️ Jetpack C

Team Matrix 6 Dec 23, 2022
A library to receive and show notification for Android.

Basalam Notification A library to receive and show notiffication for Android. Register or unregister user to your server. Receive Notifictation per 15

Basalam 23 Dec 14, 2022