📱 Android Library for 💫fluid, 😍beautiful, 🎨custom Dialogs.
AestheticDialogs is a library that provides beautiful and custom Dialog inspired by Laravel Notify
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 | |
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 of Aesthetic Dialogs is simple. You can check /app directory for demo. Let's have look on basic steps of implementation.
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.8'
}
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 |
You can download the demo app on PlayStore
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.
This library is built using following open-source libraries.
Copyright 2019 TEKOMBO Gabriel
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.