In Erel's [B4X] B4XPages + B4XDrawer example, I need to make a transparent background for B4XPage2 and Drawer.CenterPanel. I did tried these code snippets to no avail -
Drawer.CenterPanel.Color = xui.Color_Transparent and Root.Color = xui.Color_Transparent.
Drawer.CenterPanel.Color = xui.Color_Transparent and Root.Color = xui.Color_Transparent.
B4X:
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
Drawer.Initialize(Me, "Drawer", Root, 200dip)
Drawer.CenterPanel.LoadLayout("Page2")
Drawer.LeftPanel.LoadLayout("Page2Left")
Page3 = B4XPages.GetPage("Page 3")
HamburgerIcon = xui.LoadBitmapResize(File.DirAssets, "hamburger.png", 32dip, 32dip, True)
#if B4i
Dim bb As BarButton
bb.InitializeBitmap(HamburgerIcon, "hamburger")
B4XPages.GetNativeParent(Me).TopLeftButtons = Array(bb)
#Else If B4J
Dim iv As ImageView
iv.Initialize("imgHamburger")
iv.SetImage(HamburgerIcon)
Drawer.CenterPanel.AddView(iv, 2dip, 2dip, 32dip, 32dip)
iv.PickOnBounds = True
#end if
Drawer.CenterPanel.Color = xui.Color_Transparent
Root.Color = xui.Color_Transparent
End Sub
Last edited: