B4A Library Dialogs library

Status
Not open for further replies.

thedesolatesoul

Expert
Licensed User
Longtime User
It's Android that doesn't support modality, not Java. Basic4android implements its own modality mechanism and Msgbox and my Dialogs library use that. The dialogs themselves are indeed based on Android Dialogs.

Sorry, that is what I meant. But good to clarify. So if I do implement my own dialogs is there anything I need to add to support modality?
Thanks.
 

agraham

Expert
Licensed User
Longtime User
I want to port some dialogs (for eg progress dialog)
You probably don't want a modal progress dialog. While a modal dialog is displayed none of your other code can run - except possibly events raised from views displayed on the dialog. The existing Basic4android ProgressDialog does not use the modal mechanism and displays a standard Android ProgressDialog.

B4X:
is there anything I need to add to support modality?
Yes. call anywheresoftware.b4a.Msgbox.msgbox(MyAlertDialog, false) to display a modal dialog. Note that only AlertDialogs are accepted.

EDIT:- Passed on the inside while preparing the answer!
 

thedesolatesoul

Expert
Licensed User
Longtime User
You should call:
Note that the internal implementation of modal dialogs is very (very) complicated.
All the more reason to appreciate B4A developers efforts!


I was talking about an AlertDialog with a progressbar.
The code will be running in a service and the UI will be updated.
I am now thinking this will be too complicated.

B4X:
is there anything I need to add to support modality?
Yes. call anywheresoftware.b4a.Msgbox.msgbox(MyAlertDialog, false) to display a modal dialog. Note that only AlertDialogs are accepted.
[/QUOTE]
If there are no buttons on the dialog (only lists) how does the modality end? Does it detect for 'touch' anywhere? Or when you code on an event (List_Click) to hide the dialog.

I think this is getting quite hard for me!!!
 

brainfart

Member
Licensed User
Longtime User
Ways to include HTML link in a Dialog

Hello.
Can someone advise of a simple way to add a HTML link to a dialog box.
The only way I know is adding a label with the right color and underline to make it look like link and then in its click event use intent.

Is there a simpler way to add a HTML link to a dialog?
I am trying to put a link to the publishers website in an "About" CustomDialog2.

Thanks
 

moster67

Expert
Licensed User
Longtime User
@brainfart

Did you see my reply in this very thread?

Inviato dal mio Nexus One usando Tapatalk
 

brainfart

Member
Licensed User
Longtime User
:sign0161:
Sorry. This thread is so convoluted that I did not see your reply.
I just looked for a reply right bellow mine in hybrid view instead of chronological order.

I will give your suggestion a try.

Thank you.
 

agraham

Expert
Licensed User
Longtime User
I would be happy to provide a three slider version of ColorDialog that does Hue, Saturation and Value/Luminance if that's what you want but I won't try touch selection on a gradient in a 2D panel as I don't think the precision on these capacitive touch screens is good enough for it to work well.
 

boten

Active Member
Licensed User
Longtime User
agraham;61349.... said:
I don't think the precision on these capacitive touch screens is good enough for it to work well.
u'r right of course. Never mind.
 

agraham

Expert
Licensed User
Longtime User
In version 2.4, now posted, thanks to an observation by mikecox codified by JesseW the InputDialog and the two CustomDialogs will now close the soft keyboard on exit if it was left showing.

FileDialog.FileFilter now accepts either a single filter value like ".txt" or a comma separated list of values like ".jpg,.png". Note that spaces in filter values are significant and are not ignored. If a filename contains the text of any one of the filter values the file will be displayed.
 

AscySoft

Active Member
Licensed User
Longtime User
Yes! It does working... I tested it on my project, an InputDialog (used for password, just like a logIn form without all the coding) , now the soft keyboard's gone.

It will be great also in the future if changing orientation would not destroy Dialogs!
Until then, 'mucho respeto' (and after, of course) :sign0188:
 
Last edited:

agraham

Expert
Licensed User
Longtime User
I see you found PasswordMode!

It will be great also in the future if changing orientation would not destroy Dialogs!
That will never be possible because of the way Android is designed. The activity showing the dialog is destroyed, and therefore so is the dialog, and a new activity is created in the new orientation.
 

AscySoft

Active Member
Licensed User
Longtime User
I see you found PasswordMode!
Yes.. that's why I edited previous post... silly me!

That will never be possible because of the way Android is designed. The activity showing the dialog is destroyed, and therefore so is the dialog, and a new activity is created in the new orientation.
So this mean that in Activity Create first time to set a boolean=true (global process variable) only if InputDialog got something,...
...
if not (user change orientetion/ dialog destroy)
...
do something in Activity Resume, check if bool value=true, else redisplay input dialog?!
Thanks for your quick reply!
Probably would work, but i think is not (so) ideal...
 

Amalkotey

Active Member
Licensed User
Longtime User
expansion of the lib

Hi Andrew,

I miss a wait dialog, See in Android Developer. There is the permutations that the dialogs libbrary is extended dialogue with this?

regards
Amalkotey
 

Attachments

  • dialog_progress_spinning.png
    2.6 KB · Views: 252
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…