[F/OS] ⚠️ DaffyDialog - Additional Tools To The Notifier Component!

:computer: Introduction

A non-visible extension that provides additional tools to the built-in Notifier component in :niotron: Niotron. This extension has:

  • custom choose dialog (two option buttons and one cancel button).

  • number picker dialog (pick a number).

  • custom password dialog (allow the user to input a password. The ShowPasswordDialog block in Notifier only has 3 parameters, this extension has 12.)

  • custom text input dialog (allow the user to input text. The ShowTextDialog block in Notifier only has 3 parameters, this extension has 13.)

:clock8: Version: 3

:package: Package name: com.gordonlu.daffydialog

: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)

GotCustomChooseDialog

image

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

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

GotNumberPickerDialog

image

This event is fired when the user has selected a number in a number picker dialog.

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

GotPasswordInputDialog

image

This event is fired when the user has entered their password in a password input dialog.

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

GotTextInputDialog

image

This event is fired when the user has entered some text in a text input dialog.

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

NumberPickerDialogCanceled

image

This event is fired when the user has canceled the number picker dialog.

Parameters: id = number (int)

PasswordInputDialogCanceled

image

This event is fired when the user has canceled the password input dialog.

Parameters: id = number (int)

TextInputDialogCanceled

image

This event is fired when the user has canceled the text input dialog.

Parameters: id = number (int)

Method blocks

:warning: Note the following:

  • I do not need the ID parameter. It is only for you to distinguish 2 dialogs with the same extension. If you don’t want to distinguish them, fill in the ID to any integer.

  • If you have set cancelable to false, the cancelButtonText parameter will be ignored.

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, button1Text = text, button2Text = text, cancelButtonText = text, cancelable = boolean

ShowNumberPickerDialog

image

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

Parameters: id = number (int), title = text, buttonText = text, cancelButtonText = text, message = text, minValue = number (int), maxValue = number (int), 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

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, defaultText = text, hint = text, inputBold = boolean, inputItalic = boolean, inputFont = text, hintColor = color, inputColor = color, buttonText = text, cancelButtonText = text, cancelable = boolean, inputType = number
(boolean)

For 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, read the Android Developers documentation.

:newspaper: Sample Blocks

Sample blocks are in the documentation!

:inbox_tray: Downloads

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

:lock: Open Source

Here you go.

https://github.com/GordonL0049/DaffyDialog

:speech_balloon: Why this extension?

Currently in Niotron, we do not have a lot of options for choose dialog, text input, etc. Although you can use layouts for custom dialogs, if that increases, your app pile up like regrets. This extension is used to fill in the gaphole.


Made with Niotron IDE.

Kindly :email: PM me if you have any questions! Also, if you like my extension, please :heart: like it! It takes some effort for me to make it…

Votes and likes tell me the general user feedback of my extension. If you read this extension, please take 20 seconds to drop by and give a vote / like!

If you have any features that you want to add and you know the code, PM me or directly reply below using the Reply button.

By downloading my extension, you agree the terms and conditions in my website


Gordon Lu

:speech_balloon: Message :earth_africa: Website :e-mail: E-mail

7 Likes

Excellent work @Gordon_Lu thanks for your contribution

1 Like

Many many thanks for this great Extension @Gordon_Lu , I liked that you have made it open source,
But i have one suggestion that you should use git and github for open source as you’ll also get a copy of LICENSE which would be better

Anyways Awesome extension :+1:t2:

1 Like

Yes, I am currently building a repo for this extension.

Good to hear that

Thanks! I have now added it.

https://github.com/GordonL0049/DaffyDialog

2 Likes