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

I am not sure this is usable in classic. Since there is also Classic mode in App Inventor (which 90% of people use), I will have to consider twice for whether to add this.

Please add this I really need this you can do something like this add 3 radio buttons which shows 3 options classic theme, dark, and light easy.

Why will you need to toggle 3 themes? In an AlertDialog's perspective, this is not just "three themes". In the R.style class, there are 50+ themes, for example, a theme with full screen and dark mode, a theme with full screen and light mode, etc.

1 Like

Ok gordon lu I am not telling you to do anything in your extension, but please tell me how can I change this with blocks?
image

I guess you need an extension. I will give you one you tomorrow (i.e. 12 hrs later).

1 Like

Thank you so much you are too good.

:trophy: Version 5!

  • Added a hasIcon parameter for all blocks. If you set this to false, the icon parameter will be ignored.

  • Now, you can use HTML to set the message of your dialogs!

HtmlMessage (designer, blocks editor, read, write)

image

image

This property specifies whether HTML format should be enabled for messages of all dialogs. Set this before you show the dialogs.

Requires: boolean

  • Added a message parameter for all methods!

  • Note: sorry, I want clear enough in the topic. Text should be 1, not 0.

3 Likes

Great extension, however I find it extremely annoying that the iconPath argument doesn't accept image blocks. I've spent over an hour now trying to figure out how to get the absolute paths of the images i have within the app... I'm sure there's a reason why it was easier to use the raw paths but srsly. plus, I worry if there's any change to how the file system is set up on the user's phone all of the image paths will be broken. Also, how do I even get the path of those images? What path is used in the example? plz help.

You need an absolute path, e.g. /storage/emulated/0/.../image.png.

Read Anke's tutorial. An absolute path is used.

You can:

Show your blocks.

No, they won't. The extension does not change anything.

first of all thanks for replying so fast I mean wow
I could not find that full path anywhere thank you

one more thing, will the path change when the app is built? I notice it specifies the companion within it.

Yes. However, if you save the image with the File component with the scope "App", and use this extension:

then you do not need to do a lot of work. The path would be:

the ASD + (image name).

tysm absolute godsend :pray:

but also plz consider just making it accept the standard image blocks so we can avoid this headache

I will try.

1 Like

sorry to bother you about this again, but can you provide more clarification on how I would go about saving the image asset with the File Component? Where does the image asset move to once I package the app. I don't completely understand. Thanks

Ok, nevermind I got it (finally)
After searching these forums for over 2 hours I've finally pieced together enough info to solve this problem...

so that the next person with this question can get a clear answer,
here is the configuration that works for me in both companion AND final build.
(I will note that there are still ways to improve it but this is a good starting point)

Here's how to get it to accept an image block:

Basically, when the app starts you have to copy all of the images you will use into the App Scope.

the list in the copyImgs function will need to contain all of the images you want to use

As you can see this is wayy too much setup for simply being able to plug an image asset block into this extension, and it should be supported from within the extension (please!).

The reason that it requires an absolute path is because BitmapFactory can only decode an absolute path, not because I don't want to. A lot of extensions, such as TaifunSharing, WhatsappTools, all require absolute paths. Also, you can simply do this.

1 Like

Hi Gordon, it seems that there is a bug in the ShowNumberPickerDialog. When you write numbers directly to the dialog box using keyboard instead of using + and - buttons - the return value is always 0. Thanks
p.s it could be also useful to add the possibility to set and to visualize an initial value in the dialog box

1 Like

I will check it and fix it hopefully. Thanks for reporting.

1 Like

New version 6!

  • Classic is no longer supported. You can now choose from Light or Dark mode, but Classic is disabled because no such class exists in R.style. I will roll out a new version that does not have the Light/Dark functions, but matches the theme of the app.

  • HTMLMessage is now changed to HTMLFormat to support HTML titles.

  • New blocks and features!

CustomDialogDismissed

image

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

Error

image

This event is invoked when an error has occurred.

Parameters: error = text, block = text

LinearProgressDismissed

image

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

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

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.

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

UpdateProgress

image

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

Parameters: progress = number (int)

DimAmount

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

image

image

image

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

Accepts: boolean

LightTheme

image

image

image

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

Accepts: boolean

1 Like