GithubHelp home page GithubHelp logo

leeyouseung / aestheticdialogs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gabriel-thecode/aestheticdialogs

0.0 1.0 0.0 10.85 MB

📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.

Kotlin 100.00%

aestheticdialogs's Introduction

Aesthetic Dialogs for Android 📱

platform API License Open Source? Yes!

📱 Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.

Get it on Google Play

Table of Contents:

Introduction

AestheticDialogs is a library that provides beautiful and custom Dialog inspired by Laravel Notify

Types of Dialog

AestheticDialog At this moment, library provides eight types of dialog i.e.

1. Flash Dialog 2. Connectify Dialog 3. Toaster Dialog
4. Emotion Dialog 5. Drake Dialog 6. Emoji Dialog
7. Rainbow Dialog 8. Flat Dialog

Dark Mode

AestheticDialog Also provides Dark Theme for some dialogs i.e.

1. Connectify Dark Dialog 2. Toaster Dark Dialog 3. Emoji Dark Dialog
4. Flat Dark Dialog LET's USE aesthetic Dialog !

Implementation

Implementation of Aesthetic Dialogs is simple. You can check /app directory for demo. Let's have look on basic steps of implementation.

Prerequisite

i. Gradle

Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
		maven { url "https://jitpack.io" }
	}
}

Step 2. Add the dependency

dependencies {
	...
	implementation 'com.github.gabriel-TheCode:AestheticDialogs:1.3.3'
}

Create Dialog

You can create multiple dialogs by specifying the style of your component, the type, and the animation of alert you want to display to the user. You can override the .setOnClickListener() method to add a particular event, however some dialogs do not need it.

Example 1: Flat Dialog

                  AestheticDialog.Builder(this, DialogStyle.FLAT, DialogType.SUCCESS)
                        .setTitle("Title")
                        .setMessage("Message")
                        .setCancelable(false)
                        .setDarkMode(true)
                        .setGravity(Gravity.CENTER)
                        .setAnimation(DialogAnimation.SHRINK)
                        .setOnClickListener(object : OnDialogClickListener {
                            override fun onClick(dialog: AestheticDialog.Builder) {
                                dialog.dismiss()
                                //actions...
                            }
                        })
                        .show()

Example 2: Emotion Dialog

  AestheticDialog.Builder(this, DialogStyle.EMOTION, DialogType.ERROR)
                        .setTitle("Title")
                        .setMessage("Message")
                        .show()

Optional methods

  • setCancelable()
  • setDarkMode()
  • setDuration()
  • setGravity()
  • setAnimation()

Constants

DIALOG STYLE DIALOG TYPE DIALOG ANIMATION
RAINBOW
FLAT
CONNECTIFY
TOASTER
DRAKE
EMOJI
EMOTION
SUCCESS
ERROR
WARNING
INFO
DEFAULT
SLIDE_UP, SLIDE_DOWN
SLIDE_LEFT, SLIDE_RIGHT
SWIPE_LEFT, SWIPE_RIGHT
IN_OUT
CARD
SHRINK
SPLIT
DIAGONAL
SPIN
WINDMILL
FADE
ZOOM

Demo

You can download the demo app on PlayStore

Contribute

Let's develop with collaborations. We would love to have contributions by raising issues and opening PRs. Filing an issue before PR is must. See Contributing Guidelines.

Credits

This library is built using following open-source libraries.

License

Open Source Love svg1

Project is published under the Apache 2.0 license. Feel free to clone and modify repo as you want, but don't forget to add reference to authors :)

aestheticdialogs's People

Contributors

gabriel-thecode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.