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,001
  • Dialogs3.00.zip
    48.9 KB · Views: 2,954
  • Dialogs4.01.zip
    72.2 KB · Views: 9,577
Last edited by a moderator:

irda

Member
Licensed User
Longtime User
Great job, but there's any way to change the background color o text color in filedialog? I can't see the letters with the holo.light theme.
 

Attachments

  • Captura.JPG
    Captura.JPG
    38 KB · Views: 359

irda

Member
Licensed User
Longtime User
i don't understand. There is not place to change alpha value in colordialog.
 

stanks

Active Member
Licensed User
Longtime User
yes we cant change alpha, so i asked how to add another seekbar to dialog for changing alpha value
 

georgelbs

Member
Licensed User
Longtime User
I have the following error with date dialog when pick a date with any 31 day, only occurs on Android 2.3x devices, Emulator included
 

Attachments

  • date error.png
    date error.png
    25.4 KB · Views: 289

jmoeller

Member
Licensed User
Longtime User
Great job, but there's any way to change the background color o text color in filedialog? I can't see the letters with the holo.light theme.
I am having the same issue. Have you found a solution or a work around?
 

tim50stroud

Member
Licensed User
Longtime User
Apologies; new to B4A and having problems using using this library in an app; came here and getting the same issue when I use the Dialogs 2.92.zip. When I compile in b4a (version 3.5) it throws the following error:

Compiling generated Java code. Error
B4A line: 178
End Sub
javac 1.7.0_60
src\anywheresoftware\b4a\agraham\dialogsdemo\main.java:358: error: package anywheresoftware.b4a.agraham.dialogs.InputDialog does not exist
anywheresoftware.b4a.agraham.dialogs.InputDialog.ColorDialog _cd = null;
^
1 error
(^ is pointing t the "." in "InputDialog.ColorDialog _cd"
I've tried googling round for a solution but I just assume its something so obvious and trivial.....
 

tim50stroud

Member
Licensed User
Longtime User
Seems like you haven't copied the jar file to the additional libraries folder (set under Tools - Configure Paths).

That was my guess, but the dialog.jar and xml are sitting happily alongside another additional library, both of which are specified in the "lib" check boxes of the IDE; it just doesnt seem to be picking up the dialog files
 

RomansUP

Member
Licensed User
Longtime User
I have the following error with date dialog when pick a date with any 31 day, only occurs on Android 2.3x devices, Emulator included
Yes, I saw the same error. I have put inside manifest file <uses-sdk android:minSdkVersion="4"/>
But I have catched another one bug. If you try to set date before 01.01.2011 and run it on device with Android 2.3.x you will get one day behind. You can find it here http://www.b4x.com/android/forum/threads/one-day-behind-on-android-2-3-6.41838/#post-252138
 

tim50stroud

Member
Licensed User
Longtime User
Try to create a new project and see whether if happens. If it does then please upload the project.

Its the program in the dialog2.92.zip that is failing, so the code should be correct. The Dialog library (2.92) appears in the right hand library list ticked, the extra library path has the dialog.jar / xml files.
It works fine on another windows 7 PC with what appears to be the same installation.
Are there any other logs/settings that might be helpful?
C:\program files\Java\jdk1.7.0_60\javac.exe
C:\android\platforms\android-19\android.jar
 

tim50stroud

Member
Licensed User
Longtime User
The Java version and Android SDK version are not related here.

Try to delete dialogs.jar / xml from your computer and start the IDE. Make sure that dialogs library is not listed. Now download it again and refresh the libraries.

Ok; I'll try that this evening when I'm back home. Thanks for the support
 

tim50stroud

Member
Licensed User
Longtime User
Ok; I'll try that this evening when I'm back home. Thanks for the support

Success! But a bit puzzled by the solution. I deleted the dialogs.jar/xml from the extra library folder, checked it hadn't got into the library folder:
C:\Program Files\Anywhere Software\Basic4android\extras
C:\Program Files\Anywhere Software\Basic4android\Libraries

Restarted and the Dialog library was still there. Confirmed the library path was as above, and that it was empty.

After a bit of searching found that windows 7 was keeping a copy of the dialog library at:

C:\Users\user\AppData\Local\VirtualStore\Program Files\Anywhere Software\Basic4android\Extra

Deleted that and the library dissappeared from Basic4 android. Reloaded it into the b4a extras folder and it now works as advertised.

The folder where the the copy was held now only has
C:\Users\Tim\AppData\Local\VirtualStore\Program Files\Anywhere Software\Basic4android with no files.

How did it get there in the first place; a feature of windows or B4A or something I did?

Thanks VERY much for pointing me in the right direction anyway :)
 

tim50stroud

Member
Licensed User
Longtime User
This is a "feature" of Windows. I highly recommend you to move the extra folder out of Program Files which is a protected location.
That makes sense, though I set up the same configuration at work, and no sign of he extra library duplication there.. the wonders of windows. I'll move the extra library to the C:\android folder and take it from there.
Many thanks again :)
 
Status
Not open for further replies.
Top