Skip to content

Releases: javiersantos/MaterialStyledDialogs

Version 3.0.2

01 Aug 21:11
ab89dab
Compare
Choose a tag to compare

Version 3.0.1

16 May 14:02
8fcf8bc
Compare
Choose a tag to compare
  • 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.

Version 3.0

16 May 11:29
268c35c
Compare
Choose a tag to compare

Kotlin release 🎉

Version 2.2

11 May 14:10
a865f4b
Compare
Choose a tag to compare
  • 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.

Version 2.1

09 Feb 19:12
Compare
Choose a tag to compare
  • Added support for DialogFragment. An example is available at the sample app.

Version 2.0

25 Sep 14:59
Compare
Choose a tag to compare

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();

Version 1.5.6

23 Sep 11:53
Compare
Choose a tag to compare
  • Partially fixed #30. Added initial support for custom styles.

Version 1.5.5

12 Aug 12:19
Compare
Choose a tag to compare
  • 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.

Version 1.5.4

27 Jul 06:50
Compare
Choose a tag to compare
  • Added autoDismiss(). If the method is false, then you must manually dismiss the dialogs when using the button callbacks. Default is true.
  • Update libraries.

Version 1.5.3

11 Jul 10:51
Compare
Choose a tag to compare

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