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

ducphu

Active Member
Licensed User
Longtime User
Hi all,
Does this library support alpha channel in a color picker, e.g user can change alpha value.
 

Mashiane

Expert
Licensed User
Longtime User
I am using the date dialog and setting a date on it when a textbox control is receiving the focus. I have set the input type to none. Whilst the day and year always returns the correct ones, the month is always stuck in January when the date dialog displays. I set a datetime.format to yyyy-mm-dd before I set the date. Can someone help please on how to solve this issue?

B4X:
Sub txtDateOfDeath_FocusChanged (HasFocus As Boolean)
    If HasFocus = True Then
        Dim ret As Int
        Dd.ShowCalendar = False
        DateTime.DateFormat = "yyyy-mm-dd"
        ' if there is a date already
        If txtDateOfDeath.Text.Length > 0 Then
            Dim iDate As Long
            iDate = DateTime.DateParse(txtDateOfDeath.Text)
            Dd.Year = DateTime.GetYear(iDate)
            Dd.Month = DateTime.GetMonth(iDate)
            Dd.DayOfMonth = DateTime.GetDayOfMonth(iDate)
        Else
            Dd.Year = DateTime.GetYear(DateTime.Now)
            Dd.Month = DateTime.GetMonth(DateTime.Now)
            Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.Now)
        End If
        ret = Dd.Show("Select the Date of Death", "Date of Death", "Ok", "Cancel", "", Bmp)
        Select Case ret
        Case -1
            'ok
            txtDateOfDeath.text = Dd.Year & "-" & NumberFormat(Dd.month,2,0) & "-" & NumberFormat(Dd.DayOfMonth,2,0)
        Case -3
            ' cancel
        End Select
    End If
End Sub
 

goron

Member
Licensed User
Longtime User
Dialogs & Images

I would like to show the selected image ( .png .jpg - etc ) as "ICON"
as can be seen below :
Dim ICON As Bitmap
Icon.Initialize(File.DirAssets, "android48.png")
Dim Action As Int = FileDialog1.Show("Select a file:", "OK", "Cancel", "", ICON)

When the textbox shows its name (file name), and before (OK, Cancel) button is pressed.
Replacing the ICON with the updated image, or create another view for it.

TIA,
Gideon
 

ivanomonti

Expert
Licensed User
Longtime User
Hello Guys,

here is the DatePickerExtended Lib

http://s14.directupload.net/file/d/3167/4963erxg_png.htm
http://s7.directupload.net/file/d/3167/yksnjh4a_png.htm

now you can use:

B4X:
yourDateDialog.setCalendarViewShown = True or False
Log(yourDateDialog.getCalendarViewShown())

to set whether the Calendar is shown or not. I also included a demo file.

it´s based on agraham´s Dialogs Lib

by Maxory aka. MxY.rlp

can you teach me how to import a native Android B4X on, I need to realize TimePickerExtended, would you give me a help Thak 100000000000 :)
 

delozoya

Member
Licensed User
Longtime User
Here you are
Hello agraham. Thaks for this library. But i have a question.

I need that the edittext for inputdialog not contain space. How I can do?

In the java code I custom with something like this

B4X:
eIME.SetCustomFilter(anEdit, anEdit.INPUT_TYPE_TEXT, "qwertyuiopasdfghjklñzxcvbnm_-")

Thanks
 

warwound

Expert
Licensed User
Longtime User
Hello agraham. Thaks for this library. But i have a question.

I need that the edittext for inputdialog not contain space. How I can do?

In the java code I custom with something like this

B4X:
eIME.SetCustomFilter(anEdit, anEdit.INPUT_TYPE_TEXT, "qwertyuiopasdfghjklñzxcvbnm_-")

Thanks

Can you test the attached update?
I've added a new AcceptedCharacters property to the InputDialog.
The default value for AcceptedCharacters is Null - no input filtering is performed.
Set a value and then give it a test and post with your results.

InputDialog
Properties:
  • AcceptedCharacters As String
    Get or Set the AcceptedCharacters used as a custom filter by the EditText
    Set a value of Null to disable any custom filter.
    Default value is Null.

Martin.
 

Attachments

  • Dialogs-v2.95.zip
    50.7 KB · Views: 364

MbedAndroid

Well-Known Member
Licensed User
Longtime User
in the file dialog a input keyboard pups up. How to surpress this keyboard? I just want the user picks a file from the list. Now the keyboard covers the presented filelist (on a 7 inch tablet)
 

warwound

Expert
Licensed User
Longtime User

fziebell

Member
Licensed User
Longtime User
Hi.
I'm new in that forum an test the demo version of b4a(5.02(1)).
I have the same Problem with the library dialogs(Download version 2.92).
The Message is:

javac 1.7.0_09
src\b4a\example\main.java:374: error: package anywheresoftware.b4a.agraham.dialogs does not exist
anywheresoftware.b4a.agraham.dialogs.InputDialog _id = null;

Everything your wrote above, i have done.
Delete dialog.jar/XML, restart b4a, lib is not in libmanager, download lib new, copy files in b4a lib directory.

The same Problem.

There ist no extra Dir in my b4a Installation and no in C:\Users\admin\AppData\Local....

I don't know, what i can do.

can you help me?

Thanks
Fred
 

fziebell

Member
Licensed User
Longtime User
...Everything your wrote above, i have done...

Yes, Thank You.
I have delete the two files in the internal libraries folder,
put the new downloaded Files in user\admin\b4a\Libs.
I have set the path to the additional libraries folder.

If i start b4a i can see and load dialogs lib.
when I load a test application that uses dialog commands , the Dialog lib loaded automatically.
OK.
But if i compile the application the result is the error message #457.

Greetings
Fred
 

fziebell

Member
Licensed User
Longtime User
Many other tests work very well ... without the dialog lib.

It may be that is the trial.version the problem ?

Today , after work , I'll try a new installation on a different computer .

Greetings
Fred
 
Status
Not open for further replies.
Top