[F/OS] ⚠️ DaffyDialog - Additional Features For The Notifier Component!

:computer: Introduction

A non-visible extension that provides additional features to the built-in Notifier component.

:package: Package name: com.gordonlu.daffydialog

:clock8: Version: 8

:date: Release date: 2022-03-25T12:30:00Z


:open_book: Documentation

Event blocks

CustomChooseDialogCanceled

image

This event is fired when the user has pressed the cancel button in a custom choose dialog.

Parameters: id = number (int)

CustomDialogDismissed

image

This event is invoked when the custom dialog you created was dismissed.

CustomMessageDialogClosed

image

This event is fired when the user has pressed the dismiss button in a custom message dialog.

Parameters: id = number (int)

Error

image

This event is invoked when an error has occurred.

Parameters: error = text, block = text

GotCustomChooseDialog

image

This event is fired when the user has pressed button1 or button2 in a custom choose dialog.

Parameters: id = number (int), choice = text

GotNumberPickerDialog

image

This event is fired when the user has pressed the OK button in a number picker dialog.

Parameters: id = numbr (int), number = number (int)

GotPasswordInputDialog

image

This event is fired when the user has pressed the OK button in a password input dialog.

Parameters: id = number (int), password = text

GotTextInputDialog

image

This event is fired when the user has pressed the OK button in a text input dialog.

Parameters: id = number (int), input = text

ImageDialogClosed

image

This event is fired when the user has pressed the dismiss button in an image dialog.

Parameters: id = number (int)

LinearProgressDismissed

image

This event is invoked when the linear progress dialog was dismissed.

NumberPickerDialogCanceled

image

This event is fired when the user has pressed the cancel button in a number picker dialog.

Parameters: id = number (int)

PasswordInputDialogCanceled

image

This event is fired when the user has pressed the cancel button in a password input dialog.

Parameters: id = number (int)

TextInputDialogCanceled

image

This event is fired when the user has pressed the cancel button in a text input dialog.

Parameters: id = number (int)

Method blocks

CreateCustomDialog

image

Show whatever you want in a dialog. You can use as example arrangements, or images or whatever you want. Your chosen layout will be then removed from the screen and only visible in custom dialog. Please make sure the layout you want to use is visible.

Parameters: component = component

CustomChooseDialog

image

Shows a custom choose dialog. The id parameter is an ID to specify the notifier, in case you want to show two dialogs with the same extension. The title and message parameter are for specifying the title and message of this dialog respectively. When the user has tapped button1 or button2 in this dialog, the extension fires the GotCustomChooseDialog event. If it is canceled, the extension will call the CustomChooseDialogCanceled event.

Parameters: id = number (int), message = text, title = text, iconPath = text, useIcon = boolean, button1Text = text, button2Text = text, cancelButtonText = text, cancelable = boolean

CustomMessageDialog

image

Displays a custom message dialog.

Parameters: id = number (int), title = text, message = text, iconPath = text, useIcon = boolean, buttonText = text

DismissCustomDialog

image

Dismisses the custom dialog that you have shown.

DismissLinearProgressDialog

image

Dismisses the linear progress dialog that you have shown.

ShowCustomDialog

image

Shows the custom dialog that you have created.

ShowImageDialog

image

Displays an image in a dialog. This requires an absolute path pointing to the image location. All supported file types are PNG, JPEG and JPG. After the user has pressed the button, the extension will fire the ImageDialogClosed event.

Parameters: id = number (int), title = text, message = text, imagePath = text, buttonText = text, iconPath = text, useIcon = boolean

ShowLinearProgressDialog

image

Shows a progress dialog with a horizontal progress bar. Can be dismissed by user if "cancelable" is set to true. If indeterminate is set to true, maxValue and the "UpdateProgress" block will have no effect.

Parameters: title = text, message = text, iconPath = text, useIcon = boolean, indeterminate = boolean, maxValue = number (int), color = color, cancelable = boolean, buttonText

ShowNumberPickerDialog

Displays a number picker dialog that enables the user to select a number from a predefined range.

Parameters: id = number (int), title = text, iconPath = text, useIcon = boolean, buttonText = text, cancelButtonText = text, message = text, minValue = number (int), maxValue = number (int), cancelable = boolean

ShowPasswordInputDialog

Shows a password input dialog. The id parameter is an ID to specify the notifier, in case you want to show two dialogs with the same extension. The title parameter is for specifying the title of this dialog. defaultText is the default text for the input in which the user will first see in the textbox when they open the dialog, and hint is the hint of that textbox. Use inputBold, inputItalic, hintColor and inputColor to customize the textbpx, and use the property blocks to specify inputFont. buttonText is the text of the OK button, while cancelButtonText is the text of the cancel button.

Parameters: id = number (int), title = text, message = text, defaultText = text, hint = text, inputBold = boolean, inputItalic = boolean, inputFont = text, hintColor = color, inputColor = color, buttonText = text, cancelButtonText = text, useIcon = boolean, cancelable = boolean

ShowTextInputDialog

image

Shows a text input dialog. The id parameter is an ID to specify the notifier, in case you want to show two dialogs with the same extension. The title parameter is for specifying the title of this dialog. defaultText is the default text for the input in which the user will first see in the textbox when they open the dialog, and hint is the hint of that textbox. Use inputBold, inputItalic, hintColor and inputColor to customize the textbpx, and use the property blocks to specify inputFont. buttonText is the text of the OK button, while cancelButtonText is the text of the cancel button.

Parameters: id = number (int), title = text, message = text, defaultText = text, hint = text, inputBold = boolean, inputItalic = boolean, inputFont = text, hintColor = color, inputColor = color, buttonText = text, cancelButtonText = text, cancelable = boolean, inputType = number, iconPath = text, useIcon = boolean, cancelable = boolean

For what to fill in in the inputType parameter, here are some examples.

  1. plain old normal text - 1.

  2. number - 2.

  3. phone number - 3.

  4. date/time - 4.

  5. email address - 32.

For more, see the Android Developers documentation: InputType  |  Android Developers

UpdateProgress

image

Updates the progress of the linear progress dialog. Has no effect if it is indeterminate.

Parameters: progress = number (int)

Property blocks

DimAmount (designer, blocks, read, write)

image

image

image

Sets the amount of dim behind the dialog window. 0.0 stands for no dim and 1.0 stands for full dim.

Accepts: number (float)

Fullscreen (designer, blocks, read, write)

image

image

image

This property specifies whether fullscreen should be enabled for the dialog.

Accepts: boolean

HTMLFormat (designer, blocks, read, write)

image

image

image

This property specifies whether HTML format should be enabled for the messages and titles of all dialogs in this extension.

Accepts: boolean

LightTheme (designer, blocks, read, write)

image

image

image

This property specifies whether light theme should be enabled for the dialog.

Accepts: boolean

Plus, 4 property blocks for fonts: DefaultFont, SansSerif, Serif and Monospace.


:inbox_tray: Downloads

AIX:
com.gordonlu.daffydialog.aix (36.2 KB)


:lock: Open Source


:scroll: License

This extension is licensed under Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0).

:white_check_mark: Remix and redistribute the extension or its source code however you like, for private, public, education and commercial use.
:warning: Mention the author explicitly, and provide a link to this topic.


Regards,
Gordon

20 Likes

Mind blowing, you are going so fast @gordonlu310, keep contributing and i really appreciate your hard work,
Thank you for this great Extension

1 Like

Nice Extension!

1 Like

Thank you both!

Fast, but not as fast as some users, who made an extension in their first day in the community.

1 Like

Seems improved Alt notifer extension by @TIMAI2

1 Like

Not 100% true...

Does it contain this Text Input feature?

Yes, I have seen (and used) his extension. However, this extension has font typeface, dialog identification with ID, custom textbox colors, and default text, while his extension has multiple textboxes, etc. This extension is also open source like his (because why not). It will depend on your specific requirements for each extension.

1 Like

:candy: Version 2!

  • Number picker dialogs!

GotNumberPickerDialog

image

This event is fired when the user has pressed the OK button in a number picker dialog.

Parameters: id = numbr (int), number = number (int)

NumberPickerDialogCanceled

image

This event is fired when the user has pressed the cancel button in a number picker dialog.

Parameters: id = number (int)

To show a number picker dialog, use:

image

3 Likes

You might want to also integrate the Image Notifier function from @TIMAI2's Image Notifier extension!

So it becomes an all-in-one extension...

I usually do not want to work with images and icons, and go for functions that are not about images and icons, but I will think about it.

1 Like

You can also try, implementing some of the Kodular's notifier blocks and functions here, since App Inventor does not have them...

For example, the progress dialog

Please read the main post.

1 Like

I see, you read my mind and edited the post, right?

No, it was before you even started replying.

This is your post's posted time.

My edit:

image

1 Like

That's a great extension
instead of making plenty of textboxes in UI , you can make it one textbox at time to the user so he/she stays focused on per one signal per time [ majority of human beings brains works like that concept ]

2 Likes

:chocolate_bar: Version 3!

  • More features! :cowboy_hat_face: Yee-haw!

CustomChooseDialogCanceled

image

This event is fired when the user has pressed the cancel button in a custom choose dialog.

Parameters: id = number (int)

GotCustomChooseDialog

image

This event is fired when the user has pressed button1 or button2 in a custom choose dialog.

Parameters: id = number (int), choice = text

GotPasswordInputDialog

image

This event is fired when the user has pressed the OK button in a password input dialog.

Parameters: id = number (int), password = text

PasswordInputDialogCanceled

image

This event is fired when the user has pressed the cancel button in a password input dialog.

Parameters: id = number (int)

CustomChooseDialog

Shows a custom choose dialog. The id parameter is an ID to specify the notifier, in case you want to show two dialogs with the same extension. The title and message parameter are for specifying the title and message of this dialog respectively. When the user has tapped button1 or button2 in this dialog, the extension fires the GotCustomChooseDialog event. If it is canceled, the extension will call the CustomChooseDialogCanceled event.

Parameters: id = number (int), message = text, title = text, button1Text = text, button2Text = text, cancelButtonText = text, cancelable = boolean

ShowPasswordInputDialog

image

Shows a password input dialog. The id parameter is an ID to specify the notifier, in case you want to show two dialogs with the same extension. The title parameter is for specifying the title of this dialog. defaultText is the default text for the input in which the user will first see in the textbox when they open the dialog, and hint is the hint of that textbox. Use inputBold, inputItalic, hintColor and inputColor to customize the textbpx, and use the property blocks to specify inputFont. buttonText is the text of the OK button, while cancelButtonText is the text of the cancel button.

Parameters: id = number (int), title = text, defaultText = text, hint = text, inputBold = boolean, inputItalic = boolean, inputFont = text, hintColor = color, inputColor = color, buttonText = text, cancelButtonText = text, cancelable = boolean

  • :bug: Bug fix - when the user clicks the background, the notifier will NOT cancel the dialog.

  • Now, you will be able to set the input type of the ShowInputTextDialog!

image

For what to fill in in the inputType parameter, here are some examples.

  1. plain old normal text - 0.

  2. number - 2.

  3. phone number - 3.

  4. date/time - 4.

  5. email address - 32.

For more, see the Android Developers documentation.

https://developer.android.com/reference/android/text/InputType

Updated post with source code now.

EDIT: woops! I have errors in the source code, I will update it. Don't (yet) use the source code. Apologies for inconvenience.

This is the output for the CustomChooseDialog block in Classic mode (left/top) and Device Default (right/bottom).

This is the output for the ShowPasswordInputDialog block in Classic mode (left/top) and Device Default (right/bottom).

3 Likes

@gordonlu310 can you please add this type of notifier also that dismisses automatically once the option is selected.
image

:fireworks: Version 4!

Note: in this update, I have added icons and image paths. Note that all paths should be absolute.

  • Some more blocks added!

CustomMessageDialogClosed

image

This event is fired when the user has pressed the dismiss button in a custom message dialog.

Parameters: id = number (int)

ImageDialogClosed

image

This event is fired when the user has pressed the dismiss button in an image dialog.

Parameters: id = number (int)

CustomMessageDialog

image

Displays a custom message dialog.

Parameters: id = number (int), title = text, message = text, iconPath = text, buttonText = text

ShowImageDialog

image

Displays an image in a dialog. This requires an absolute path pointing to the image location. All supported file types are PNG, JPEG and JPG. After the user has pressed the button, the extension will fire the ImageDialogClosed event.

Parameters: id = number (int), title = text, message = text, imagePath = text, buttonText = text, iconPath = text

  • I have added an icon parameter for all blocks! Woo hoo!
3 Likes

Radio buttons...sure yes...in version 1 I added it, the app keeps reporting errors because Java indexes start with 0, but App Inventor indexes start with 1. It is so complicated.

1 Like

If possible please add all the notifiers present in this extension. Take your own time I am not forcing you.