Android Question Custom B4XDialog without "Ok" and "Cancel" buttons - recover bottom space

mmanso

Active Member
Licensed User
Longtime User
Hi there,

I'm developing a custom dialog and I want to have my own "Ok" and "Cancel" buttons. I understand I can disable the default ones with:

B4X:
Wait For (dialog.ShowCustom(p, "", "", "")) Complete (Result As Int)

When I do this, they disappear (and that's fine) but the space occupied buy them remains on my custom layout (in the bottom). Is there any way to remove that space assigned to the buttons?

Thanks.
 

Mahares

Expert
Licensed User
Longtime User
in the bottom). Is there any way to remove that space assigned to the buttons?
If you do this, it hides the buttons and you reclaim the space by those buttons, which is what you want:
B4X:
Dialog.ButtonsHeight=0dip
 Wait For (Dialog.ShowCustom(p, "ok", "", "cancel")) Complete (Result As Int)
But if you do this, it will crash:
B4X:
Dialog.ButtonsHeight=0dip
 Wait For (Dialog.ShowCustom(p, "", "", "")) Complete (Result As Int)
Not sure if the end result is what you want to see.
 
Upvote 0
Top