B4A Library Dialogs library

Status
Not open for further replies.

joneden

Active Member
Licensed User
Longtime User
I've mucked around with the reflector lib and added an on touch event. That only works when clicking on the spinner main box - it doesn't handle the itemclicked event I think that the only option that I can work with for now is to add an imageview to the right of the spinner and use that as the click event. The user will have to select from the drop down then click the image - better than reworking the form!
 

EduardoElias

Well-Known Member
Licensed User
Longtime User
Hi There!

I am looking to make a modal dialog to enter a pin code. I got a printscreen from a youtube video of what i meant, it is attached.

I dont want to use the android keyboard.

I have not figured out using the dialog how to do that.

Thanks
 

Attachments

  • pin dialog.png
    94.7 KB · Views: 287

Informatix

Expert
Licensed User
Longtime User

If you have a specific need, you can do easily the same thing with two panels: one for the dialog, and one, behind, occupying the whole screen, to block touch events.
 

EduardoElias

Well-Known Member
Licensed User
Longtime User
If you have a specific need, you can do easily the same thing with two panels: one for the dialog, and one, behind, occupying the whole screen, to block touch events.

Thank You Informatix. After more searching i have found your library Floating window and that is helping me a lot.

I am using it to display the pind pad. I have created before it showing a semitransparent panel to somewhat hide the application behind. I am getting the OnMove event to force the windows to be pinned. There is no option to create a windows already pinned, only the user can do that.

I know you make this to be modaless, however what can be done for the user do not click on the other buttons behind?

Many thank for your source code, I am learning a lot from it.
 

Informatix

Expert
Licensed User
Longtime User
There is no option to create a windows already pinned, only the user can do that.

Yes, I forgot to add this function. Since you have access to the source code, you can add it easily.

I know you make this to be modaless, however what can be done for the user do not click on the other buttons behind?

Place a panel between the floating window and the other views, and create a OnTouch handler for this panel (even empty).
 

arp

Member
Licensed User
Longtime User
Enhancement request

Hi agraham,

thanks for this fabulous library. Can I ask for a modification to the TimeDialog to allow the selection of seconds as well, thanks.
 

Comalco

Member
Licensed User
Longtime User
Change Size of ColorDialogHSV

I scrolled tyhrough most pages in this thread and couldnt find any mention of changing the overall size/scale of the color dialog box?

I love the layout as it is, except I would like to make it smaller overall.
Is there a syntax to set the size of the dialog - while still keeping the color bars etc all in scale?

Ideally I would like to make the entire dialog about 1/2 or 2/3 its defualt size.

Is there a way of doing this in the AGraham Dialogs library?
 

joneden

Active Member
Licensed User
Longtime User
Resume after another activity

In a custom dialog that I have, I have a button that the user can press to take a photo. When that happens when the user presses the button is that the custom view is saved to a variable, then the photo activity is launched.

Once the user has taken a photo or cancelled it, the activity returns. The procedure that is called tries to restart the dialog using the standard dialog.show command. At this point I get an error as below:
"The specified child already has a parent. You must call removeView on the child's parent first."

Is there a way to redisplay the original dialog - it's almost as if it's open but just hidden from view. Even better would be not having it close in the first play but that seems to be impossible if loading another activity...

Regarsd,

Jon
 

Comalco

Member
Licensed User
Longtime User
Even with the dialog size fixed, its still a great library......thanks. I guess the alternative is to re-create a specific dialogue with a panel and separate controls and make that smaller.......a good learning activity forme. Thanks again.
 

arp

Member
Licensed User
Longtime User
Standard View?

Thanks for the reply, agraham.

Do you know of a "standard" view for the number selector in the dialogs? Or is it constructed on a listview or scrollview or similar?

would like to make the time selector with seconds look as uniform as possible with the other dialogs.

I really appreciate the time you all put into this forum, and the enhancements via libraries etc.
 

agraham

Expert
Licensed User
Longtime User
The numeric up-down is an internal Android View used by Android to implement the dialog. It is not available to programs. Look at the first answer here.

EDIT :- I've just noticed it is exposed in Android SDK 11 and up. It would need a library to wrap and expose it. There's a job for somebody.
 

arp

Member
Licensed User
Longtime User
many thanks for the reply. seems a bit silly on Googles part not to expose standard UI elements - especially when they harp on about consistency of user experience etc.

Will see what I can get from that link - maybe time to figure out how to do libraries..... Thanks again. :sign0188:
 

Inman

Well-Known Member
Licensed User
Longtime User
Does CustomDialog2 have some sort of padding inside it? This is all I did.

B4X:
Dim cd As CustomDialog2, pnlone as Panel
pnlone.Initialize("")
pnlone.Color=Colors.Blue
cd.AddView(pnlone,468dip,400dip)
cd.Show("Dialog","","","",Null)

Here is the screenshot



Notice the gap on left and right edges? Why is this happening? I want the panel to fill from left edge to right edge.

Then I changed CustomDialog2 to CustomDialog and used cd.AddView(pnlone,0,0,468dip,400dip) instead. And this is what I got.



My device is Asus Transformer TF101 tablet running Android 4.0.3.
 

thedesolatesoul

Expert
Licensed User
Longtime User
Read the docs: Basic4android - Dialogs
It says:
CustomDialog2

This modal dialog displays a custom set of controls laid out on a Basic4android Panel.
The Panel will be automatically centred in the displayed dialog.
CustomDialog2 centres things, while CustomDialog uses Absolute positioning.
 

Inman

Well-Known Member
Licensed User
Longtime User
I understand that. But is it possible to make the panel fill from left edge to right edge?
 

padvou

Active Member
Licensed User
Longtime User
Input dialog for email address

Is it possible to somehow show the relevant IME with the "@" when i want a user to enter an email address in an input dialog?
Thank you
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…