Generic Dialog

Additional

Language
Java
Version
2.3 (May 16, 2019)
Created
Jan 29, 2019
Updated
Jun 19, 2019
Owner
Jaidev Naik (jaidevnaik5886)
Contributor
Jaidev Naik (jaidevnaik5886)
1
Activity
Badge
Generate
Download
Source code

Announcement

GenericDialog

A new AlertDialog for Android is here...!!

Getting Started

Installation

Add this into your root build.gradle file:

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

Add the dependency to your module build.gradle:

implementation 'com.github.jaidevnaik5886:GenericDialog:2.2'
implementation 'com.github.jaidevnaik5886:GenericDialog:2.3' //For AndroidX Support

Usage

    new GenericDialog.Builder(this)
                .setDialogFont(R.font.nunito_bold)
                .setDialogTheme(R.style.GenericDialogTheme)
                .setIcon(android.R.drawable.checkbox_on_background)
                .setTitle("Success  !").setTitleAppearance(R.color.colorPrimaryDark, 16)
                .setMessage("Data Collected Successfully")
                .addNewButton(R.style.CustomButton, new GenericDialogOnClickListener() {
                    @Override
                    public void onClick(View view) {
                        Toast.makeText(MainActivity.this, "OK later Clicked", Toast.LENGTH_SHORT).show();
                    }
                })
                .setButtonOrientation(LinearLayout.HORIZONTAL)
                .setCancelable(true)
                .generate();

ScreenShots