MaterialStyledDialogs Versions Save

A library that shows a beautiful and customizable Material-based dialog with header. API 14+ required.

3.0.2

3 years ago
  • #85 Dark mode support. Thanks to @marcauberer.

3.0.1

4 years ago
  • Added .positiveButton(), .negativeButton() and .neutralButton() to get the buttons of the dialog.

Kotlin release 🎉

  • Re-written in Kotlin. Thanks to @marcauberer.
  • Upgrade to AndrodX. Thanks to @marcauberer.
  • Update material-dialogs to 3.3.0
  • Fixes wrong title when using Style.HEADER_WITH_TITLE.

3.0

4 years ago

Kotlin release 🎉

  • Re-written in Kotlin. Thanks to @marcauberer.
  • Upgrade to AndrodX. Thanks to @marcauberer.
  • Update material-dialogs to 3.3.0
  • Fixes wrong title when using Style.HEADER_WITH_TITLE.

2.2

4 years ago
  • Added .setIconAnimation(R.anim.your_animation) to set a custom animation for the dialog icon. A zoom in-out animation will be used by default. Thanks to @chkfung.

2.1

7 years ago
  • Added support for DialogFragment. An example is available at the sample app.

2.0

7 years ago

Warning, this is a major release. There are some changes that can break existing code.

  • The Builder has been rewritten. See the guide below to migrate your existing 1.x code.
  • setPositive(...), setNegative(...) and setNeutral(...) have been deprecated. You should now use setPositiveText(string), setPositiveText(int), onPositive(callback)...
  • The deprecated withAnimation(boolean) method has been removed.
  • Updated material-dialogs to 0.9.0.2

How to migrate your existing code to 2.x

Using the new Builder

The dialogs are now initialized using MaterialStyledDialog.Builder. Checkout this basic examples:

new MaterialStyledDialog.Builder(this)
    .setTitle("Awesome!")
    .setDescription("What can we improve? Your feedback is always welcome.")
    .show();

or

MaterialStyledDialog dialog = new MaterialStyledDialog.Builder(this)
    .setTitle("Awesome!")
    .setDescription("What can we improve? Your feedback is always welcome.")
    .build();
...
dialog.show();

Adding buttons and callbacks

The previous methods setPositive(...), setNegative(...) and setNeutral(...) have been deprecated. You should use the next ones:

new MaterialStyledDialog.Builder(this)
    .setTitle("Awesome!")
    .setDescription("What can we improve? Your feedback is always welcome.")
    .setPositiveText(R.string.button)
    .onPositive(new MaterialDialog.SingleButtonCallback() {
        @Override
        public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
            Log.d("MaterialStyledDialogs", "Do something!");
    })
    //.setNegativeText(...)
    //.onNegative(...)
    //.setNeutralText(...)
    //.onNeutral(...)
    .show();

1.5.6

7 years ago
  • Partially fixed #30. Added initial support for custom styles.

1.5.5

7 years ago
  • Added method to allow setting the header ImageView's scale type: .setHeaderScaleType(). Default: ScaleType.CENTER_CROP. Thanks to @colinrtwhite.
  • Added method .setHeaderColorInt() to allow setting header an @ColorInt. Thanks to @colinrtwhite.
  • Fixed #28.

1.5.4

7 years ago
  • Added autoDismiss(). If the method is false, then you must manually dismiss the dialogs when using the button callbacks. Default is true.
  • Update libraries.

1.5.3

7 years ago

Fixed wrong margin when using a custom view without title nor description.