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,976
  • Dialogs4.01.zip
    72.2 KB · Views: 9,654
Last edited by a moderator:

barni7

New Member
Licensed User
Longtime User
On Android 4.x, there is an error with DateDialog.
How can I prevent that the month grid view is shown?
This hides the display of year, month and day.
My manifest.xml includes:
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
 

Attachments

  • Screenshot1.png
    Screenshot1.png
    66.9 KB · Views: 315
Last edited:

barni7

New Member
Licensed User
Longtime User
I have two devices, Samsung Galaxy S3 Android 4.1.1
and Ainol Novo 7 Basic with 4.0.3.
It is the same proplem.

With manifest.xml
<uses-sdk android:minSdkVersion="4">
it works
with
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
it dont works.
I need the second option, because I need the menu button on titlebar of an activity.
 
Last edited:

barni7

New Member
Licensed User
Longtime User
My APP only use the portrait oriantation.
The dialog will not fit on the screen.
 

barni7

New Member
Licensed User
Longtime User
On a 10'' tablet everything is OK.
7'' or less, we have a problem.
The dialog should also work without month Grid.
This should be automatically adapted to the screen size.
 

agraham

Expert
Licensed User
Longtime User
I'm sorry but I have no idea why that is happening. I can seee nothing in the Android DatePickerDialog, which is what DateDialog uses, that affects how the dialog is displayed. There is a picture in Pickers | Android Developers which shows it without the calendar but I cannot see how they have done that :confused:

Perhaps someone else has an idea, maybe its because it is displayed in a DialogFragment - personally I gave up on Android months ago as they keep messing around with the GUI and I can't be bothered to keep up to date with it.
 

galcott

New Member
Licensed User
Longtime User
FileDialog ShowFoldersOnly setting

I am trying to use the FileDialog with ShowFoldersOnly set to true. There are 2 problems with this. First, the edit box appears but has no function with that setting on. Second, the keyboard appears automatically. I don't want the edit box or the keyboard when I am using it only to select folders. Can these issues be fixed? Thanks.

Glenn
 

Informatix

Expert
Licensed User
Longtime User
I am trying to use the FileDialog with ShowFoldersOnly set to true. There are 2 problems with this. First, the edit box appears but has no function with that setting on. Second, the keyboard appears automatically. I don't want the edit box or the keyboard when I am using it only to select folders. Can these issues be fixed? Thanks.

Glenn

There's an alternative at your disposal: the File Explorer class.
 

padvou

Active Member
Licensed User
Longtime User
There should be a way or there is and I'm not aware of it, that the date input dialog should display date picking capabilities like the one attached in the image.
My device which is less that 7'' cannot properly display it as it is now.
 

Attachments

  • pickers.png
    pickers.png
    38.9 KB · Views: 366

cnicolapc

Active Member
Licensed User
Longtime User
Spinner in Custom Dialog

I created this custom dialog that contien a text field and a Spinner. (Spin1)
I can not update the text field with the value of the spinner.
It is normal for spin1_itemclick not work in a custom dialog?
If I close the custom dialog and then reopen the text field is updated.
Thank you
Nicola
 

Attachments

  • Dialog.jpg
    Dialog.jpg
    58.1 KB · Views: 351

Jack Cole

Well-Known Member
Licensed User
Longtime User
Kindle Fire HD 8.9 timedialog problem

On the Kindle Fire HD 8.9, the time dialog does not show the numbers for the text. See attached.
 

Attachments

  • timedlg.png
    timedlg.png
    12.5 KB · Views: 275

MLDev

Active Member
Licensed User
Longtime User
Hi agraham,

I made a change to your dialogs library. When using FileDialog the keyboard always pops up. I didn't like that. I changed it so the keyboard only pops up when the EditText is manually clicked on. Is it OK to post it here? or do you want to see it first and post it?
 

agraham

Expert
Licensed User
Longtime User
As I have given up on Android development it is probably a good thing if someone else can recompile it if needed. I am happy for you to post it here as long as you have updated the version number of the library. Might I suggest that you make your change optional by adding a suitably named property to the FileDialog, defaulting to the present behaviour, so that backward compatibility can be maintined.

As we can only edit our original posts I suggest that you post the full zip including demos here and I'll put a link to that post on the first page. Then you could link on from there if there are any further changes in the future.
 
Last edited:

MLDev

Active Member
Licensed User
Longtime User
Update to agraham's Dialogs library. Added FileDialog.KeyboardPopUp property. If set to False the keyboard only pops up when the EditText is manually clicked on. Default is True.
 

Attachments

  • Dialogs.2.91.zip
    59.5 KB · Views: 1,125

Mahares

Expert
Licensed User
Longtime User
@MLDev: is it possible to change the date and time dialog so when an EDITTEXT is clicked to store a date or time, it does not show the keyboard and instead show the date and time picker immediately. My current workaround is to use labels to store time and date so the keyboard does not show up, but the date and/or time picker appear.
Thank you for your contribution.
 

Suntzu

Member
Licensed User
Longtime User
Update to agraham's Dialogs library. Added FileDialog.KeyboardPopUp property. If set to False the keyboard only pops up when the EditText is manually clicked on. Default is True.

Could you also add that property to the CustomDialog? Thanks.

Sent from my SAMSUNG-SGH-I717 using Tapatalk 2
 

MLDev

Active Member
Licensed User
Longtime User
Could you also add that property to the CustomDialog? Thanks.

I'll look into it but I don't think I can make that property work in CustomDialog. I'm just removing the focus from the EditText in FileDialog to keep the keyboard from popping up. There isn't an instance of EditText in the CustomDialog classes.

@MLDev: is it possible to change the date and time dialog so when an EDITTEXT is clicked to store a date or time, it does not show the keyboard and instead show the date and time picker immediately.

DateDialog and TimeDialog dosen't pop up the keyboard. I'm not sure what you're doing. Could you post some code and I'll see what I can do.
 
Status
Not open for further replies.
Top