B4A Library [B4X] [XUI] B4XDialog - Custom dialogs - Erel    
Dec 19, 2021   
(22 reactions)Edit: B4XDialogs is part of XUI Views library. Use that instead: XUI Views - Cross platform views and dialogs
B4XDialog class helps with creating cross platform custom dialogs. The dialog is made... As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0, 0, 0, 300dip, 170dip) 'set... most cases it requires a bit more work as you also want to handle keyboard changes:
'B4A
Sub..., NewHeight)
End Sub
'B4i
Sub Page1_KeyboardStateChanged (Height As Float)
If Dialog.Visible Then...
B4A Code Snippet [B4X] Share your B4XDialog + templates theming code - Erel    
Jun 1, 2021   
(9 reactions)Have you created a nice dialog based on B4XDialog?
Post it here.
If you have any question then start a new thread....
B4A Library [B4X] [XUI] AS TimePickerDialog based on B4XDialog and AS_TimePicker - Alexander Stolte    
Jul 1, 2025   
(18 reactions) the B4XDialog
Github: github.com/StolteX/AS_TimePickerDialog
Have Fun :)
https://www.b4x.com/android...
Initialize (Parent As B4XView) As String
Initializes the object. You can add parameters to this method...
link: Thanks Alexander, very nice tool!
I believe I found a bug: When in 12h format, when the time picker opens, if I click on "12" or "00" for the hour selection and AM is selected, th...
B4A Code Snippet [B4X] B4XDialog with adjustable button widths - Erel    
Nov 4, 2025   
(22 reactions) is a global B4XCanvas used for measuring the text (see attached example).
Private Sub ArrangeButtons(Dialog1 As B4XDialog, Canvas1 As B4XCanvas)
Dim offset As Int = Dialog1.Base.Width - 2dip
Dim gap....DialogResponse_Negative, xui.DialogResponse_Positive)
For Each btn As B4XView In Dialog1.Base... r As B4XRect = Canvas1.MeasureText(btn.Text, btn.Font)
Dim width As Float = r.Width..., cvs) 'cvs is a global B4XCanvas
Wait For (rs) Complete (Result As Int)
End Sub
Example...
B4J Code Snippet B4XDialog - Add keyboard handling - Erel    
Apr 7, 2019   
(8 reactions)This code allows the user to close the dialog with 'escape' or one of the following keys: Y, N or C.
It depends on agraham's jReflection library.
Sub AddKeyPressedListener
Dim r As Reflector
r.Target = MainForm.RootPane
r.AddEventHandler("keypressed", "javafx.scene.input.KeyEvent.KEY_PRESSED")
End Sub
Sub KeyPressed_Event (e As Event)
If Dialog.Visibl...
B4A Code Snippet [B4X] B4XDialog - show with animation - Erel    
Feb 24, 2020   
(15 reactions)Slides the dialog from one of the sides.
Sub AnimateDialog (dlg As B4XDialog, FromEdge As String)
Dim base As B4XView = dlg.Base
Dim top As Int = base.Top
Dim left As Int = base.Left
Select FromEdge.ToLowerCase
Case "bottom"
base.Top = base.Parent.Height
Case "top"
base.Top = -base.Height
Case "left"...
Usage example:
Sub Globals
Private dialog As B4XDialog
Private xui As XUI
End Sub
Sub...
B4A Code Snippet [B4X] [B4XPages] Nested B4XDialogs - Erel    
Jun 16, 2020   
(11 reactions)B4A project is attached.
By default, when a B4XDialog is shown it will close other visible dialogs. This is prevented with this line:
Dim rs As Object = MainDialog.ShowCustom(CustomPanel, "Ok", "", "")
MainDialog.Base.Parent.Tag = "" 'this will prevent...)
The other interesting thing is how to handle the back key:
Sub B4XPage_CloseRequest As ResumableSub
For Each d As B4XDialog In Array(SecondDialog, MainDialog) 'order is important. Should start...
B4i Question B4XDialog - B4XInputTemplate crashes after pressing ok - Alexander Stolte    
Oct 23, 2023 to use the input dialog:
Application_Start
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
Application_Active
Unexpected event (missing RaisesSynchronousEvents): b4ipage_keyboardstatechanged:
Error occurred on line: 269 (B4XPagesManager)
Method not found: resumeAsUserSub, target: , _buttonwidth=80, _base=<B4XViewWrapper: <B4IPanelView: 0x7f96c18149b0; frame = (63..., _buttonstextcolor=-7744001
, _background=<B4XViewWrapper: <B4IPanelView: 0x7f96c1e11780; frame...
B4A Question B4XDialog.ShowCustom not work in a projector with ANDROID SYSTEM using remote control. - scsjc    
Dec 4, 2023Using the B4XDialog.ShowCustom on a projector (with a ANDROID O.S.) with a remote control, it won't let me press the DialogResponse_Positive or DialogResponse_Cancel button, because the KEYS FOCUS of the projector's remote control cursor is still on the screen panel.
Is there any way to avoid this? and that by moving the remote control cursor to the left or right, you can select ACCEPT or CANCEL of the B4XDialog.ShowCustom. ...something like RequestFocus for the B4XDialog.ShowCustom...
B4A Question B4XDialog elevation - LucaMs    
Mar 27, 2022"Having had" to study the source code of the XUI Views a bit, I noticed that, in the B4A version, the elevation of the Background panel of the B4XDialog has been set to 4dip. This is obviously a problem, if there was a View with higher elevation in the underlying layout (to avoid writing nonsense, I have experienced it, although I was practically certain).
How to create this type of View, dialogs, that are certainly displayed above any other?
What is the maximum elevation value...
Page: 1  
2  
3  
4  
5  
6  
7