Alert Dialog - You can use this extension instead of creating a separate Alert Dialog for each Activity or Fragment.

Overview

BaseAlertDialog

What is Base Alert Dialog ?

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.

Screen Shot 2021-11-01 at 15 46 46

How to use ?

Very simple. We call the showAlertDialog extension on the activity or fragment you want to use. We give the properties of the components of our layout that we created for the dialog in the callback.

For example;

private var alertDialog: AlertDialog? = null

alertDialog = showAlertDialog {

        cancelable = false

        setTitle("Title")
        setBody("Body")

        prepareOkayButton("Okay", "#A7DE3D")
        prepareCancelButton("Cancel", "#F77B7B")

        okayClickListener {

            Toast.makeText(applicationContext, "OkayListener", Toast.LENGTH_SHORT).show()
            alertDialog?.dismiss()
        }

        cancelClickListener {

            Toast.makeText(applicationContext, "CancelListener", Toast.LENGTH_SHORT).show()
            alertDialog?.dismiss()
        }
    }

    alertDialog?.show()

You can edit the layout according to your own wishes and define it from the Alert Dialog Helper class. 😊

You might also like...
An Android Dialog Lib simplify customization.
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

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 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

Common dialog fragments
Common dialog fragments

Common dialog fragments

Custom Dialog
Custom Dialog

Custom Dialog use Lottie Dialog How To Use? If yow want specific lottie file you must put your assets to under app → src → main → assets folder Add li

Owner
Gökmen Bayram
Gökmen Bayram
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

Abdullah Alhazmy 73 Nov 29, 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
AlertDialog - Explain about Alert Dialog in Android

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

Monthira Chayabanjonglerd 1 Feb 13, 2022
Make your native android Dialog Fancy and Gify. A library that takes the standard Android Dialog to the next level with a variety of styling options and Gif's. Style your dialog from code.

FancyGifDialog-Android Prerequisites Add this in your root build.gradle file (not your module build.gradle file): allprojects { repositories { ...

Shashank Singhal 522 Jan 2, 2023
[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 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
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
A simple library for creating animated warnings/dialogs/alerts for Android.

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 c

Emre 144 Nov 29, 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