Android Question Change corner raduis of the CustomLayoutDialog

Mahares

Expert
Licensed User
Longtime User
Is it possible to change corner raduis of the CustomLayoutDialog?
You might be better off using the newer B4XDialog with a custom dialog. You need to select the XUI Views library.
B4X:
Sub Globals
    Private txtFirstName As B4XFloatTextField
    Private txtLastName As B4XFloatTextField
    Private Dialog As B4XDialog
    Private xui As XUI
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Dialog.Initialize(Activity)
    Dialog.Title = "First and last Name"
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 300dip, 400dip)
    p.LoadLayout("MyDialog")   'has 2 B4XFloatTextField in this case, one for 1st name, the 2nd for last name
    p.SetColorAndBorder(xui.Color_Cyan, 10dip, xui.Color_Red, 20dip)
    Dim rs As ResumableSub = Dialog.ShowCustom(p, "OK", "", "CANCEL")
    Wait For (rs) Complete (Result As Int)
    If Result = xui.DialogResponse_Positive Then
        Dialog.Show($"Hello ${txtFirstName.Text} ${txtLastName.Text}"$, "OK", "", "")
    End If
End Sub
 

Attachments

  • CustomDialogWIthCornerRadius.png
    CustomDialogWIthCornerRadius.png
    11.8 KB · Views: 121
Upvote 0

Ilya G.

Active Member
Licensed User
Longtime User

This works perfect!
 
Upvote 0
Top