I have been creating a custom dialog and it pops up fine. I am trying to dismiss the dialog by clicking outside (semi transparent black) the dialog box and here are my codes :
B4X:
Private Sub ShowPopDialog()
Dim VVV As B4XView=xui.CreatePanel("VVV")
VVV.SetLayoutAnimated(0,0,0,90%x,45%y)
VVV.LoadLayout("PopAdvert")
AllFunc.CreateSlideAd(CTA_Slidead1)
dialog.BackgroundColor=xui.Color_Transparent
dialog.ButtonsHeight=0
dialog.BorderWidth=0
dialog.BorderCornersRadius=5dip
dialog.ShowCustom(VVV,"","","")
dialog.Base.Top=10%y
End Sub