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: 12,710
  • Dialogs3.00.zip
    48.9 KB · Views: 2,747
  • Dialogs4.01.zip
    72.2 KB · Views: 8,830
Last edited by a moderator:

DonManfred

Expert
Licensed User
Longtime User
i´m sure this is the WRONG place to ask this. This is the thread for the dialogs library

I dont know
 

Douglas Farias

Expert
Licensed User
Longtime User
@warwound can you pls put a option to
- hide the edittext
- Option to change ↓Files ↓ text or remove this text line
- Option to change .. text or remove this text line
on filedialogs pls?

thx
 

Gagandeep Singh

Member
Licensed User
Hello, I am facing a problem. I am unable to simulate the program. I tried updating the library functions as well but things don't seem to be in place. Somebody please help.
DialogError.png
 

DonManfred

Expert
Licensed User
Longtime User
I am unable to simulate the program.
Add
B4X:
    Dim ret As Int
To the sub Globals...

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim ret As Int
    Dim btnDate As Button
    Dim btnInput As Button
    Dim getTime As Button
    Dim Bmp As Bitmap
    Dim btnColor As Button
    Dim btnColor2 As Button
    Dim btnNumber As Button
    Dim btnFile As Button
    Dim btnCustom As Button
   
    Dim lbl1 As Label
End Sub
 

demasi

Active Member
Licensed User
Longtime User
Is there a way to get the exact dimensions of the dialog panel for any device?
Or maybe get the dialog´s top, left, bottom and right coordinates?
Or the corrdinates of the Cancel and Ok buttons?
I need to position my views in a custom dialog, but it looks different in each device.
 

Graeme Tacon

Member
Licensed User
Longtime User
Is anyone else facing this issue? I want to use the number dialog with 4 digits and 1 decimal place. It worked fine on my SGS3 (android v4.4.4), but now on my SGS6 edge (android 6.0.1), in portrait mode, you can only see the first 4 digits - the decimal place is off the side of the screen. See attached screenshots.

Is there a way around this ?

I'm using v2.92 of the library.

Thanks
Graeme
 

Attachments

  • sgs3.png
    sgs3.png
    37.2 KB · Views: 273
  • sgs6.png
    sgs6.png
    40.6 KB · Views: 258
Last edited:

aedwall

Active Member
Licensed User
Longtime User
I am using v2.92 and do not get what you display in your demo. I get the 3-control set for month-day-year, with the year control cut off after the "2" in "2016" and then the calendar to the right. But in your demo, just the calendar displays no matter what my setting is for Dd.ShowCalendar. Can you tell me what is going on? Thank you.

dd.ShowCalendar = False 'displays year control rather than calendar itself (MAKES NO DIFFERENCE IF SET TO TRUE OR FALSE)
dd.Year = DateTime.GetYear(DateTime.Now)
dd.Month = DateTime.GetMonth(DateTime.Now)
dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)

ret = dd.Show("Set the date", "What date do you want?", "OK", "", "", Bmp1)
 

clooney48

Active Member
Licensed User
Longtime User
Is anyone else facing this issue? I want to use the number dialog with 4 digits and 1 decimal place. It worked fine on my SGS3 (android v4.4.4), but now on my SGS6 edge (android 6.0.1), in portrait mode, you can only see the first 4 digits - the decimal place is off the side of the screen. See attached screenshots.

Is there a way around this ?

I'm using v2.92 of the library.

Thanks
Graeme

Hi Graeme!
I have got exactly the same problem! Originally when I wrote my app 2 years ago it worked flawless.
Didn´t find a solution up to now.
 

MattC

Member
Licensed User
Longtime User
Is there a problem with the current file attached to the first post?

I've downloaded it and everything works (so files are in Additional Libraries folder etc) except there is no ListView visible on the CustomDialog2 example, it just shows btn1. Btn1 works btw. Just no listview. This occurs with no changes to the code.

As far as I know I'm not having issues anywhere else in the examples or in B4A itself.
 

DonManfred

Expert
Licensed User
Longtime User
except there is no ListView visible on the CustomDialog2 example
Which customdialog2 demo??? There is only one example in post #1 (DialogsDemo.b4a) and this does not show a listview

Edit: Ohh, i see in btnCustom2_Click

Change
B4X:
    pnl.AddView(lv, 300dip, 120dip, 120dip, 250dip)
to
B4X:
    pnl.AddView(lv, 20dip, 120dip, 120dip, 250dip)

The LV is there. just 300dip from left....

You should start a new thread in the questionsforum and upload a example project which shows this issue (file-Export as zip)
 
Last edited:

MattC

Member
Licensed User
Longtime User
Which customdialog2 demo??? There is only one example in post #1 (DialogsDemo.b4a) and this does not show a listview

Edit: Ohh, i see in btnCustom2_Click

Change
B4X:
    pnl.AddView(lv, 300dip, 120dip, 120dip, 250dip)
to
B4X:
    pnl.AddView(lv, 20dip, 120dip, 120dip, 250dip)

The LV is there. just 300dip from left....

You should start a new thread in the questionsforum and upload a example project which shows this issue (file-Export as zip)
That's it, I'm using a Z3 compact, list was off the screen.
Thank you! Something something something paypal!
 

JTmartins

Active Member
Licensed User
Longtime User
Hi everyone.

I'using V2.92 of this library, but I can only get 4 digits. I would like to have something like ###.##, but I cant find a way of displaying more than 4 digits even using nd.digits=8.

Even the demo, which in theory should show 10 digits only showes 4 !!!

Android 6 here.

I've seen posts about this, but found no solution so far. Help would be welcome.
 

divinglog

Member
Licensed User
Longtime User
Hi, I've updated to 2.94. What happened to the ShowCalendar property in the DateDialog, which was available before?
 
Status
Not open for further replies.
Top