/ Dialogs

Smart Alert Dialog with android

Smart Alert Dialog with android

SmartAlertDialog

With this library you can easily use alert dialog in Android.


With Two Buttons

With One Button

To install the library just add this line to your gradle:
implementation 'com.github.TecOrb-Developers:SmartAlertDialog:v1.0'

And add this where you want:

  new SmartDialogBuilder(context)
                    .setTitle("Smart Dialog")
                    .setSubTitle("This is the alert dialog to showing alert to user")
                    .setCancalable(false)
                    .setTitleFont(titleFont) //set title font
                    .setSubTitleFont(subTitleFont) //set sub title font
                    .setNegativeButtonHide(true) //hide cancel button
                    .setPositiveButton("OK", new SmartDialogClickListener() {
                        @Override
                        public void onClick(SmartDialog smartDialog) {
                            Toast.makeText(context,"Ok button Click",Toast.LENGTH_SHORT).show();
                                smartDialog.dismiss();
                        }
                    }).setNegativeButton("Cancel", new SmartDialogClickListener() {
                @Override
                public void onClick(SmartDialog smartDialog) {
                    Toast.makeText(context,"Cancel button Click",Toast.LENGTH_SHORT).show();
                    smartDialog.dismiss();

                }
            }).build().show();

GitHub