Smart-dialog - Smart and easy to be implemented dialog for Android

Related tags

Dialog smart-dialog
Overview

smart-dialog

Smart, customized and easy to be implemented dialog for Android.

  • Implement your preferred dialog anywhere you want with few lines of code.
  • Consists of: image, title, message, dismiss button, and action button.
  • Only title is required.
  • Custom as you want: colors, text size, dialog action, dialog background, buttons background.

alt text alt text alt text alt text

Installation: Gradle

implementation 'com.github.MohamedGamalFci:smart-dialog:1.1'

Usage

Basic

new SmartDialog(this)
                .setDialogTitle("Smart Dialog")
                .setMessage("Smart Dialog Sample")
                .setDismissBtnText("Ok")
                .disableActionBtn()
                .showDialog();

Custom

new SmartDialog(this)
                .setDialogTitle("Smart Dialog")
                .setMessage("Smart Dialog Sample")
                .setMessageTextSize(20)
                .setMessageTextColorResId(getResources().getColor(libs.mohamedgamal.smartdialog.R.color.black))
                .setDismissBtnText("dismiss")
                .setActionBtnText("Ok")
                .setActionBtnClickAction(new Callable() {
                    @Override
                    public Object call() throws Exception {
                        // implement your action here
                        return null;
                    }
                })
                .setCanceledOnTouchOutsideDialog(false) // cancel dismissing dialog when touch out side
                .setDialogImageDrawable(getResources().getDrawable(R.drawable.android)) // set dialog image here
                .setDialogImageDimensions(100, 100) // custom image size
                .setDialogImageScaleType(ImageView.ScaleType.FIT_CENTER) // custom image scale type
                .showDialog();

More features

  • Use one of below functions to use a ready made animation (first direction refers to the entry direction, and the second refers to the exit one).
applyUpUpAnimation()
applyUpDownAnimation() 
applyDownDownAnimation()
applyDownUpAnimation()
applyLeftLeftAnimation()
applyLeftRightAnimation()
applyRightRightAnimation()
applyRightLeftAnimation()

or use the below function to use your custom animation

setAnimationStyle(R.style.customAnimation)

styles.xml

<style name="customAnimation">
    <item name="android:windowEnterAnimation">@anim/slide_in_up</item>
    <item name="android:windowExitAnimation">@anim/slide_out_up</item>
</style>
  • Use one of below functions to choose your Dialog position
bottom()
top()
center()
  • Change Dialog background color or background drawable
setDialogBackgroundColorResId(getResources().getColor(R.color.light_gray))
setDialogBackgroundDrawable(getResources().getDrawable(R.drawable.dialog_background))
  • Custom background color for dismiss / action buttons
setDismissBtnBackgroundColorResId(getResources().getColor(R.color.green))
setActionBtnBackgroundColorResId(getResources().getColor(R.color.green))
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 quick custom android dialog project
a quick custom android dialog project

QustomDialog Qustom helps you make quick custom dialogs for Android. All this is, for the time being, is a way to make it easy to achieve the Holo loo

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

A simple library to show custom dialog with animation in android
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 {

AlertDialog - Explain about Alert Dialog in Android

AndroidTemplate I got a problem to create Android project with Java 11 and anoth

CuteDialog- Android Custom Material Dialog Library
CuteDialog- Android Custom Material Dialog Library

A Custom Material Design Dialog Library for Android Purpose CuteDialog is a Highly Customizable Material Design Android Library. CuteDialog allows dev

Common dialog fragments
Common dialog fragments

Common dialog fragments

Releases(1.1)
Owner
Mohamed Gamal
Mohamed Gamal
ionalert 1.3 1.6 Java Sweetalert, Dialog, Alert Dialog

ionalert - Android Alert Dialog A beautiful design Android Alert Dialog, alternative of Sweet Alert Dialog based on KAlertDialog using MaterialCompone

Excel Dwi Oktavianto 23 Sep 17, 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
[Deprecated] This project can make it easy to theme and custom Android's dialog. Also provides Holo and Material themes for old devices.

Deprecated Please use android.support.v7.app.AlertDialog of support-v7. AlertDialogPro Why AlertDialogPro? Theming Android's AlertDialog is not an eas

Feng Dai 468 Nov 10, 2022
An beautiful and easy to use dialog library for Android

An beautiful and easy to use dialog library for Android

ShouHeng 22 Nov 8, 2022
An easy to use, yet very customizable search dialog

search-dialog An awesome and customizable search dialog with built-in search options. Usage First add jitpack to your projects build.gradle file allpr

Mad Mirrajabi 518 Dec 15, 2022
AlertDialog for Android, a beautiful and material alert dialog to use in your android app.

AlertDialog for Android, a beautiful and material alert dialog to use in your android app. Older verion of this library has been removed

Akshay Masram 124 Dec 28, 2022
SweetAlert for Android, a beautiful and clever alert dialog

Sweet Alert Dialog SweetAlert for Android, a beautiful and clever alert dialog 中文版 Inspired by JavaScript SweetAlert Demo Download ScreenShot Setup Th

书呆子 7.3k Dec 30, 2022
Advanced dialog solution for android

DialogPlus Simple and advanced dialog solution. Uses normal view as dialog Provides expandable option Multiple positioning Built-in options for easy i

Orhan Obut 5k Dec 29, 2022
An Android Dialog Lib simplify customization.

FlycoDialog-Master 中文版 An Android Dialog Lib simplify customization. Supprot 2.2+. Features [Built-in Dialog, convenient to use](#Built-in Dialog) [Ab

Flyco 2.3k Dec 8, 2022
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

Keisuke Kobayashi 553 Nov 23, 2022