MaDialog Library

General

Category
Free
Tag
Dialogs
License
N/A
Min SDK
16 (Android 4.1 Jelly Bean)
Registered
Jul 2, 2019
Favorites
0
Link
https://github.com/umairayub79/MaDialog
See also
EZDialog
iOSDialog
FlycoDialog-Matser
OoOAlertDialog
FlickableDialog

Additional

Language
Kotlin
Version
1.6 (Oct 5, 2020)
Created
Jul 1, 2019
Updated
Oct 12, 2020 (Retired)
Owner
Umair Ayub (umairayub79)
Contributors
Osman (OsmanDroid)
Umair Ayub (umairayub79)
2
Activity
Badge
Generate
Download
Source code
APK file

Announcement

MaDialog

Material Alert Dialog

  • min SDK 16
  • was written in Java now in Kotlin
  • simple beautiful dialogs with image and GIF support

Screenshots

Installation

Add this into your project's root build.gradle file

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

Add the dependency to your module build.gradle:

dependencies {
 implementation 'com.github.umairayub79:MaDialog:1.5'
}

Example Usage

//build a simple dialog

 new MaDialog.Builder(MainActivity.this)
                        .setTitle("Example Dialog")
                        .setMessage("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis scelerisquevel. ")
                        .setPositiveButtonText("ok")
                        .setNegativeButtonText("cancel")
   setButtonOrientation(LinearLayout.HORIZONTAL)
                        .AddNewButton(R.style.AppTheme, "Yes", new MaDialogListener() {
                            @Override
                            public void onClick() {

                            }
                        })
                        .setPositiveButtonListener(new MaDialogListener() {
                            @Override
                            public void onClick() {
                              //todo
                            }
                        })
                        .setNegativeButtonListener(new MaDialogListener() {
                            @Override
                            public void onClick() {
                              //todo
                            }
                        })
                        .build();


//Available Methods

.setTitle(String);
.setMessage(String);
.setImage(int);
.setGif(int);
.setMessageTextColor(int);
.setTitleTextColor(int);
.setButtonTextColor(int);
.AddNewButton(int,String,MaDialogListener);
.setButtonOrientation(int);
.setBackgroundColor(int);
.setNegativeButtonText(String);
.setPositiveButtonText(String);
.setPositiveButtonTextColor(int)
.setNegativeButtonTextColor(int)
.setCancelableOnOutsideTouch(boolean);
.setPositiveButtonListener(MaDialogListener);
.setNegativeButtonListener(MaDialogListener);
.build();

LICENSE

   Copyright 2020 Umair Ayub

   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.