# AestheticDialogs **Repository Path**: zhangpeng_git/AestheticDialogs ## Basic Information - **Project Name**: AestheticDialogs - **Description**: 📱 An Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-02-20 - **Last Updated**: 2024-12-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Aesthetic Dialogs for Android 📱 [![platform](https://img.shields.io/badge/platform-Android-yellow.svg)](https://www.android.com) [![API](https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=plastic)](https://android-arsenal.com/api?level=14) [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html) [![](https://jitpack.io/v/gabriel-TheCode/AestheticDialogs.svg)](https://jitpack.io/#gabriel-TheCode/AestheticDialogs) [![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/Naereen/badges/) 📱 Android Library for 💫*fluid*, 😍*beautiful*, 🎨*custom* Dialogs. Get it on Google Play # Table of Contents: > - [ Introduction ](#introduction) > - [ Types of Dialog ](#types) > - [ Dark Theme ](#dark) > - [ Implementation ](#implementation) > - [ Prerequisite ](#prerequisite) > - [ Create Dialog ](#createDialog) > - [ Demo ](#demo) > - [ Contribute ](#contribute) > - [ Credits ](#credits) ## Introduction **AestheticDialogs** is a library that provides beautiful and custom Dialog inspired by [Laravel Notify](https://github.com/mckenziearts/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](/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: ```gradle allprojects { repositories { ... maven { url "https://jitpack.io" } } } ``` Step 2. Add the dependency ```gradle dependencies { ... implementation 'com.github.gabriel-TheCode:AestheticDialogs:1.3.5' } ``` ### 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 ``` kotlin 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 ``` kotlin 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](https://play.google.com/store/apps/details?id=com.thecode.sample) ## 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](CONTRIBUTING.md). ## Credits This library is built using following open-source libraries. - [Material Components for Android](https://github.com/material-components/material-components-android) ## License [![Open Source Love svg1](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://github.com/ellerbrock/open-source-badges/) 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 :)