B4A Library Dialogs library

Status
Not open for further replies.
This library contains several modal, that is blocking, dialogs by which the user can enter data. Presently they are an InputDialog for numbers and text, a TimeDialog for times and and a DateDialog for dates.

Note that modal dialogs can close unexpectedly and not return to your code if the Activity needs to close, most likely because the user rotated the device. There is a brief discussion of this in the overall library help in the xml. This can also occur with the Basic4android modal dialogs InputList, InputMultiList, Msgbox and Msgbox2 whose modal mechanism is used by the dialogs in this library.

Edit : - Version 1.1 posted with minor bug fix. See post #6 for details.

Edit : - Version 1.2 posted with Color dialogs. See post #16 for details.

Edit : - Version 1.3 posted with bug fix. See post #19 for details.

Edit : - Version 1.4 posted with a Number dialog. See post #20 for details.

Edit : - Version 1.5 posted with some enhancements. See post #28 for details.

Edit : - Version 1.6 posted with a File Dialog. See post #30 for details.

Edit : - Version 1.7 posted with a minor UI change. See post #33 for details.

Edit : - Version 1.8 posted with a Custom dialog. See post #37 for details.

Edit : - Version 1.9 posted with a bug fix. See post #42 for details.

Edit : - Version 2.0 posted with a bug fix. See post #48 for details.

Edit : - Version 2.1 posted with a second Custom dialog. See post #68 for details.

Edit : - Version 2.2 posted. See post #75 for details.

Edit : - Version 2.3 posted. See post #90 for details.

Edit : - Version 2.4 posted. See post #135 for details.

Edit : - Version 2.5 posted. See post #148 for details.

Edit : - Version 2.6 posted. See post #155 for details.

Edit : - Version 2.7 posted. See post #168 for details.

Edit : - Version 2.8 posted. See post #206 for details.

Edit :- Version 2.91 posted by Mildev. See post #317 for details. His version 2.91 is based on my unpublished v2.9 which set the text box in FileDialog to SingleLine mode.

Edit : - Version 2.92 posted. See post #341 for details.

Edit (Erel): Version 3.00 posted. Developers using B4A v6.80+ should use this version.

V4.01 is released with several improvements: https://www.b4x.com/android/forum/t...-dialogs-and-async-methods.80204/#post-507930

B4A version | Dialogs library version
------------------------------------
7.0+ 4+
6.8 3.00
<6.8 2.92
 

Attachments

  • Dialogs2.92.zip
    59.4 KB · Views: 13,034
  • Dialogs3.00.zip
    48.9 KB · Views: 2,975
  • Dialogs4.01.zip
    72.2 KB · Views: 9,654
Last edited by a moderator:

agraham

Expert
Licensed User
Longtime User
Version 2.92 now posted has a ShowCalendar property in DateDialog that may help newer small devices by suppressing the calendar part of the dialog. However on my Xoom the dialog actually stays the same size but with the date part centred so it may or may not actually help in practice.
 

roarnold

Active Member
Licensed User
Longtime User
I am getting the following error prior in 2.91 and now in 2.92.

Parsing code. 0.12
Compiling code. Error
Error compiling program.
Error description: Unknown member: additem
Occurred on line: 102
MyListView1.AddItem("Title #"& i, SomeText.Get(i))
Word: additem


Thanks,
R
 

Cothek

Member
Licensed User
Longtime User
Very nice lib here agraham. Would it be possible to add an option to disable user input to the edit text?
 

demasi

Active Member
Licensed User
Longtime User
Custom dialog black background

Hello,

Very nice library. Thank you.

is there a way to change the black background in the custom dialog?

I couldn't find the differences between customdialog and customdialog2.

Is there any?

Thank you:)
 

dune3000

Member
Licensed User
Longtime User
events do not fire immediately

Hi Agraham,

I run your dialogs demo on an android 4.0.4 phone, when I open a customdialog2, and click on the button, its event is fired immediately, but when I click on lv, its event will be fired after I close the dialog.
What's the problem?

Thanks for your help!
 

aklisiewicz

Active Member
Licensed User
Longtime User
Unzip the archive to where you want your Basic4android project to be located and read the readme file.

I have problemwith this library.
Extracted files to:
C:\Program Files\Anywhere Software\Basic4android\Libraries

but when I open IDE I cannot see it!
Any idea ?


Arthur
 

Uitenhage

Member
Licensed User
Longtime User
EditText views in a CustomDialog don't wrap.

I have a CustomDialog with two EditText views. The user can fill in either, both or none. One of the views is for a text description or some other comments - not length restricted. I have set SingleLine = False and Wrap = True. I have the entire EditText view visible in the Panel but it doesn't wrap to a second line. Instead the top line just scrolls off the left side of the view.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I did a small test and it works fine:
SS-2013-07-04_11.15.36.png


It might be easier to work with a non-modal dialog.
 

Uitenhage

Member
Licensed User
Longtime User
Thanks for the quick response. I really would prefer modal. Could you post code? That would help me immensely.

Thanks again.
 

Uitenhage

Member
Licensed User
Longtime User
Erel, never mind.

I got it to work by commenting a line of code where I set the view up:

B4X:
txtComment.Hint = "Details, units, etc." 
txtComment.SingleLine = False
txtComment.Wrap = True
txtComment.Gravity = Gravity.TOP
'txtComment.InputType = txtComment.INPUT_TYPE_TEXT
txtComment.Text = "InitialText"   'DB.GetProductComment(b.Tag)
lblCount.Text = "Count" 
lblComment.Text = "Comment"

Does this make sense?

Thanks.
 
Last edited:

Uitenhage

Member
Licensed User
Longtime User
Thanks! I have posted questions in various .Net forums (including M$) over the years and have rarely (if ever) seen the responsiveness of B4A users!

:) :) :)
 
Status
Not open for further replies.
Top