Android Question Blur in B4XDialog

iglrs1

Member
Licensed User
Hi, I'm using B4XDialog and is working ok but when I change the BlurBackground parameter from False to True (then OverlayColor is Transparent) the background change to black. Attached the images and code
B4X:
dialog.TitleBarHeight=0dip
dialog.BorderColor=Colors.Transparent
dialog.BodyTextColor=Colors.Black
dialog.ButtonsColor=Colors.Transparent
dialog.OverlayColor=Colors.Transparent
dialog.BlurBackground=True
dialog.Show("Lorem ipsum dolor sit amet, consectetur adipiscing elit","Ok","","")
Dim content As Panel=dialog.Base

Dim dr As ColorDrawable
dr.Initialize(Colors.White, 5dip)
content.Background = dr
content.Elevation = 5dip
 

Attachments

  • Blur.jpg
    Blur.jpg
    84.6 KB · Views: 50

Erel

Administrator
Staff member
Licensed User
You shouldn't see ColorDrawable in your code.
You shouldn't see Colors... in your code.

Full example:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("MainPage")
    Root.Color = xui.Color_White '<--- important as the root color is transparent by default.
    dialog.Initialize(Root)
    dialog.BlurBackground=True
End Sub

Private Sub Button1_Click
    dialog.Show("Lorem ipsum dolor sit amet, consectetur adipiscing elit","Ok","","")
End Sub
 
Upvote 0
Top