Skip to content

Change Log

Marsad Maqsood edited this page Nov 27, 2022 · 11 revisions

What's in 1.0.0

  • Upgraded to Gradle 7.3.1
  • Upgraded targetSdkVersion to 33
  • Fixed #8

What's in 0.1.10

  • Upgraded to Gradle 7.2.1
  • Removed unnecessary code

What's in 0.1.9

  • Upgraded to Gradle 7.1.2
  • Upgraded targetSdkVersion to 32
  • Added Kotlin code examples in the example app
  • Added support for Kotlin in the example app

What's in 0.1.8

Fixed bug in setCustomView() Where contentText is GONE when added custom view

.setCustomView(View view, boolean withContent)

What's in 0.1.7

Added

  • This will automatically dismiss the dialog when the button is pressed.
.setDismissOnClick(boolean dismissOnClick)

What's in 0.1.6

Added

.setCancellable(boolean cancellable)
.setCancelledOnTouchOutside(boolean cancelOnTouchOutside)

What's in 0.1.5

  • Fixed issue (Where the left side of the Neutral Button was not showing properly).

What's in 0.1.4.4

  • Bug fixes

What's in 0.1.4

  • Fixed Button color not changing while using the Material theme.
  • Change button color
dialog.getButton(StylishAlertDialog.BUTTON_CONFIRM).setBackgroundTintList(ColorStateList.valueOf(Color.GREEN));

dialog.getButton(StylishAlertDialog.BUTTON_CANCEL).setBackgroundTintList(ColorStateList.valueOf(Color.YELLOW));

What's in 0.1.1

  • Confirm Button background color changed
  • Bug Fixes

What's in 0.1.0

  • Set custom view
dialog.setCustomView(editText);
  • More convenient interface to bind listeners (like in AlertDialog)
dialog.setOnShowListener(new DialogInterface.OnShowListener() {
    @Override
    public void onShow(DialogInterface dialog) {
    
    }
});
    
dialog.setCancelClickListener(new StylishAlertDialog.OnStylishClickListener() {
        @Override
        public void onClick(StylishAlertDialog stylishDialog) {
            //Dismiss dialog with animation
            stylishDialog.dismissWithAnimation();
        }
});
    
dialog.setConfirmClickListener(new StylishAlertDialog.OnStylishClickListener() {
        @Override
        public void onClick(StylishAlertDialog stylishDialog) {
        
        }
});

dialog.setCancelButton("Cancel", new StylishAlertDialog.OnStylishClickListener() {
        @Override
        public void onClick(StylishAlertDialog stylishDialog) {

        }
});
    
dialog.setConfirmButton("Confirm", new StylishAlertDialog.OnStylishClickListener() {
        @Override
        public void onClick(StylishAlertDialog stylishDialog) {

        }
});

dialog.setNeutralButton("Neutral", new StylishAlertDialog.OnStylishClickListener() {
        @Override
        public void onClick(StylishAlertDialog stylishDialog) {

        }
});
    
  • Third neutral button with own listener, colors, methods, etc.
  • Disable buttons
dialog.getButton(StylishAlertDialog.BUTTON_CONFIRM).setEnabled(false); 
dialog.getButton(StylishAlertDialog.BUTTON_CANCEL).setEnabled(false);
  • Hide buttons after changing the alert type
dialog.getButton(StylishAlertDialog.BUTTON_CONFIRM).setVisibility(View.GONE);
dialog.getButton(StylishAlertDialog.BUTTON_CANCEL).setVisibility(View.GONE);
  • Set the buttons stroke width
dialog.setStrokeWidth(12f);
  • Dark style of dialogs
  • Ability to make dialogs without buttons
  • Support of HTML tags
  • Set text size
dialog.setContentTextSize(int value);
  • Set background color of buttons
dialog.setConfirmButtonBackgroundColor(Integer color);
dialog.setCancelButtonBackgroundColor(Integer color);
dialog.setNeutralButtonBackgroundColor(Integer color);
  • Set button text color
dialog.setConfirmButtonTextColor(Integer color);
dialog.setCancelButtonTextColor(Integer color);
dialog.setNeutralButtonTextColor(Integer color);