nima66
Member
In Android, I used the following code so that when the transparent panel is touched, the touch is not consumed and when the button is touched, the button event is also executed.
In b4j, when the pane click is not consumed, its own click event and the parent click event are executed.
How can I make the pane click event and the button click event be executed?
B4X:
Sub Activity_Create(FirstTime As Boolean)
Private deleteButton As Button
deleteButton.Initialize("deleteButton")
deleteButton.Text="Delete Item"
Activity.AddView(deleteButton, 10%x, 5%y, 20%x, 8%y)
TransparentPanelOnTop.Initialize("TransparentPanelOnTop")
Activity.AddView(TransparentPanelOnTop, 0, 0, 100%x, 100%y)
TransparentPanelOnTop.Color = Colors.Transparent
TransparentPanelOnTop.BringToFront
Dim rf As Reflector
rf.Target = TransparentPanelOnTop
rf.SetOnTouchListener("TransparentPanelOnTop_Touch")
End Sub
Sub TransparentPanelOnTop_Touch (viewtag As Object, action As Int, X As Float, Y As Float, motionevent As Object) As Boolean 'Return True to consume the event
dv1.closeView
Return False
End Sub
Sub deleteButton_Click
Log("deleteButton_Click")
End Sub
In b4j, when the pane click is not consumed, its own click event and the parent click event are executed.
How can I make the pane click event and the button click event be executed?