B4A Library Dialogs library

Status
Not open for further replies.

agraham

Expert
Licensed User
Longtime User
Works fine for me!
B4X:
   ...   
   Dim lv As ListView
   lv.Initialize("lv")
   lv.AddSingleLine("one")
   lv.AddSingleLine("two")
   lv.AddSingleLine("three")
   pnl.AddView(lv, 300dip, 120dip, 120dip, 250dip)
   
   cd.AddView(pnl, 77%x, 60%y) ' sizing relative to the screen size is probably best
   ret = cd.Show("B4A Custom Dialog", "Yes", "No", "Maybe", Bmp)      
End Sub

Sub lv_ItemClick (Position As Int, Value As Object)
   ToastMessageShow(Position, True)
End Sub
 

Inman

Well-Known Member
Licensed User
Longtime User
That is strange. My code is similar, except I used AddTwoLinesAndBitmap2. Must be some mistake of mine.

I will probably switch to Tabhost. Thanks for the help anyway.
 

netman200288

New Member
Licensed User
Longtime User
Thanks

Hi agraham.
Thanks for the useful insight. Yeah.. since it's a "feature", I guess there's nothing that can be done.

Once again.. thanks for the great work in producing the libraries!
 

brainfart

Member
Licensed User
Longtime User
Trouble setting ColorPicker palette

Hello,
I am probably messing up the Basic language syntax but i am not able to solve this problem.:BangHead:
I am trying to set the palette to a predefined colors. Here in my code they are bogus. I created an array of integers and there are 15 as required in the documentation. Then I copy / reference the array to the ColorPickerDialog.palette parameter.
The code compiles but at run time I get an error ".....java.lang.ArrayIndexOutOfBoundsException...."
What am I doing wrong?

Thanks.

B4X:
Dim result As Int
Dim CPD As ColorPickerDialog
Dim ColorZ() As Int
ColorZ = Array As Int(0xff0000,0x00ff00,0x0000ff,0xeeeeff,0x020202,0x777777,0x777777,0x777777,0x777777,0x777777,0x777777,0x777777,0x777777,0x777777,0x777777)
CPD.Palette = ColorZ
CPD.RGB = Main.ChrColor
result = CPD.Show("Pick Character Color","OK","Cancel","",Null)
 

brainfart

Member
Licensed User
Longtime User
I counted 15
3 rows of 5 plus the current color but that one comes from the RGB parameter.
I even added a
B4X:
ToastMessageShow("Array Size: " & CPD.Palette.Length,True)
to see what it is by default and it returned 15.
I have verified that I am using dialogs version 2.6
So since the size of palette array is 15 and mine is 15 why do I get the error.
Is there a problem in my syntax CPD.Palette = ColorZ ?
 

thedesolatesoul

Expert
Licensed User
Longtime User
Hello Andrew,
I am seeing a small issue with the Time dialog (probably affects date dialog as well).
When you enter the time with the virtual keyboard, and click done, the time doesnt return correctly. Only if you use the +/- buttons or the edit text (for minutes/hours) loses focus, only then the correct time is returned.
 

ostau

Member
Licensed User
Longtime User
Hide soft keyborad

Hallo Graham,

hopefully I didn´t miss a previous entry. I´m using your component and it´s very usefull. But the user has always to click twice on the ok-Button with this code:

Dim GetPW As InputDialog
GetPW.PasswordMode = True
GetPW.Input = ""
GetPW.Hint = "Bitte Passwort eingeben"
ret = GetPW.Show("Passwort","Passwort eingeben", "OK","","",Null)

(one on the ok-Button of the dialog, the second click to close the soft keybord.
Is there a way to hide the soft keyboard with the click on the dialog´s OK-button?

Kind regards, Oskar
 

agraham

Expert
Licensed User
Longtime User
As from version 2.4 of the Dialogs library pressing any of the three Dialog buttons in the InputDialog and the two CustomDialogs with the keyboard displayed should close both the dialog and the keyboard. It does this on both my ZTE Blade (2.1) and my Motorola Xoom (3.2). If it does not do it on your device then it must be a "feature" of that device.
 

ostau

Member
Licensed User
Longtime User

Hallo Graham,
thanks for your quick reply and my late one. I´m using the Galaxy Tab 7 (P1000) with V2.2. I checked the behaviour: on my device the keyboard is closed when the dialog appears. When clicking on the input text, the keyboard is shown. Any idea?

Kind regards, Oskar
 

vb1992

Well-Known Member
Licensed User
Longtime User

Andrew, is there a way for the TimeDialog to not allow the keyboard to pop up, so this problem can't surface, thanks
 

Steve

Member
Licensed User
Longtime User
Trapping the Enter key in the input dialog

Hi Agraham,

Thanks loads for the useful Dialogs library. Not being a real UI expert this saves me a lot of time developing my apps.

I am using an input dialog to let users perform searches from within my app. The dialog itself works perfectly except for something one of my users has asked for, and that is for the Enter key on either a physical keyboard or D-pad to be synonymous with clicking OK. Is this possible to do with the Dialogs library?

Thanks,
Steve
 

DemoFreak

Member
Licensed User
Longtime User
Hi,

is there an elegant method to let the user input an ip address?

When I set the InputDialog.INPUT_TYPE_DECIMAL_NUMBERS one can only enter a single dot, but also a minus sign.

Sure, I'll check the user input with regex, but it would be nice if the user can't even enter "wrong" characters.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…