-
Notifications
You must be signed in to change notification settings - Fork 1
Change Log
Marsad Maqsood edited this page Nov 27, 2022
·
11 revisions
- Upgraded to Gradle 7.3.1
- Upgraded
targetSdkVersion
to 33 - Fixed #8
- Upgraded to Gradle 7.2.1
- Removed unnecessary code
- 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
Fixed bug in setCustomView()
Where contentText is GONE
when added custom view
.setCustomView(View view, boolean withContent)
Added
- This will automatically dismiss the dialog when the button is pressed.
.setDismissOnClick(boolean dismissOnClick)
Added
.setCancellable(boolean cancellable)
.setCancelledOnTouchOutside(boolean cancelOnTouchOutside)
- Fixed issue (Where the left side of the
Neutral Button
was not showing properly).
- Bug fixes
- 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));
- Confirm Button background color changed
- Bug Fixes
- 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);