AlertDialog - Custom Dialog -Title & Message (html) • Color • Radius, Icons & Buttons

Create a dialog with titles, messages and icons.

This dialog can include a title, a message, an icon, and an "OK" button that closes the dialog. It also allows you to customize the background, text, and border colors, as well as the corner radius.

20241011_021221


Update:

Integration of buttons, an event for the buttons and a function to close the dialog.



Function:

ShowAlertDialog

  • title (String): This can include HTML.
  • message (String): This can also include HTML.
  • iconData (String): Which can be a filename in the Assets storage.
  • dialogColor (int): Background color of the dialog.
  • backgroundColor (int): Background color of the dialog content.
  • cornerRadius (float): Value that sets the corner radius of the dialog's background.
  • titleColor (int).
  • titleSize (float).
  • messageColor (int).
  • messageSize (float).

AddButtons

  • buttonIDs: List of IDs for the buttons.
  • buttonTexts: List of texts for the buttons.
  • buttonColors: List of background colors for the buttons.
  • buttonTextColors: List of text colors for the buttons.
  • buttonTextSizes: List of text sizes for the buttons.
  • buttonBorderColors: List of border colors for the buttons.
  • buttonBorderWidths: List of border widths for the buttons.
  • buttonWidths: List of widths for the buttons.
  • buttonHeights: List of heights for the buttons.
  • buttonCornerRadius: List of corner radii for the buttons.
  • buttonIcons: List of icon file names for buttons.
  • iconSizes: List of icon sizes.
  • iconPositions: List of icon positions.
  • buttonSpacing (int): Spacing between buttons.
  • bottomPadding (int): Padding at the bottom of the button container.

component_method (6)

Dismiss

  • Closes the AlertDialog.

Event:

component_event (11)

ButtonClicked

  • buttonID: Identifier of the button that was clicked.
  • buttonText: Text of the button that was clicked.
  • buttonIndex: Index of the button that was clicked.

Extension:
joejsanz.joedevalertdialog.aix (12.2 KB)


Thanks.

13 Likes

Very nice, could you add an After event, and maybe CANCEL & OK, instead of a X?

1 Like

Thank you Tim.

The x can be removed by leaving the parameter empty.
As for the cancel and accept buttons, they can be placed at the bottom, the function to add configurable buttons and an event is already done, but I have not updated the post yet.

While I show you some screenshots:

component_event (10)

2 Likes

Update:

Integration of buttons, an event for the buttons and a function to close the dialog.

2 Likes

Exactly what I needed!

How and why do you make the best extensions?!

1 Like

Thanks a lot aimbot_user

How? I search a lot, sometimes I hit a wall, but I like to create and I like my applications to look good, like everyone else I suppose.

There are more users who have made excellent extensions.
But I thank you.


Screenshot 2025-01-07 at 4.38.21 AM
This is something that I could not have made without your amazing extension, and the most important are yours. Even though I am using other extensions, you have made extensions that do the same thing, but I discovered them after finding the original, or had problems uploading them to Kodular. But nevertheless, I would always prefer your extension over most, as you make it so much easier to make my apps as good as this!

EDIT: DaffyDialog could be replaced by your AlertDialog, but they both are used in different ways in my app

Phase could have been replaced by Lottie, but I had lost all my extensions that I previously downloaded because my computer hard reset. Anyways, I saw Phase first when searching for animations, and had forgot about Lottie (I had used it a few months prior).

MakeViewUp was to stylize the texboxes, but your TextboxCustom extension was not loading into Kodular, and I had also used this extension before I moved to
Kodular.

Also I did not use the Beautify extension, so it doesn't count :slight_smile:

All in all, 3/8 extensions I use are yours, and if I had them earlier, it would've been close to 6/8

Thank you for all the help you gave me, and the community.

2 Likes

Your app looks great.

Thanks a lot for motivating me.
You help us become better developers when you use and comment on our extensions. So we can give you something better.

3 Likes