Hello,
I have a custom view where I display a panel when the user clicks the custom view.
This panel must be above all my layouts view.
But the panel does not covers some buttons created in the layout file.
I tried to send the panel to front using pnl.bringtofront but this not worked too.
Thank you.
the layout has a button, and a instance of the custom view.
The example project is attached.
This is the custom view code:
I have a custom view where I display a panel when the user clicks the custom view.
This panel must be above all my layouts view.
But the panel does not covers some buttons created in the layout file.
I tried to send the panel to front using pnl.bringtofront but this not worked too.
Thank you.
the layout has a button, and a instance of the custom view.
The example project is attached.
This is the custom view code:
B4X:
Sub Class_Globals
Private EventName As String 'ignore
Private CallBack As Object 'ignore
Private mBase As Panel
Dim pnl As Panel
End Sub
Public Sub Initialize (vCallback As Object, vEventName As String)
EventName = vEventName
CallBack = vCallback
End Sub
Public Sub DesignerCreateView (Base As Panel, Lbl As Label, Props As Map)
mBase = Base
Dim parent As Panel = Base.Parent
Base.Color = Colors.Transparent
Dim but As Button
but.Initialize("but")
Base.AddView(but,0,0,Base.Width,Base.Height)
but.Text = "Custom View - Click"
pnl.Initialize("pnl")
pnl.Color = Colors.Blue
pnl.Visible = False
parent.AddView(pnl,0,0,100%x,100%y)
pnl.BringToFront
End Sub
Public Sub GetBase As Panel
Return mBase
End Sub
Sub but_click
pnl.Visible = True
End Sub
Sub pnl_click
pnl.Visible = False
End Sub