I added that to my project and didn't work, it seems I'll have to keep this particular project locked on 1.90.
I am having what I think is a similar problem. The code below works as expected on V1.90, but does not show the Button click positions on the label in V1.92.
'Activity module
Sub Process_Globals 'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals 'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim TransparentPanelOnTop As Panel
Dim Button1 As Button
Dim Button2 As Button
Dim Label1 As Label
Dim PositionX As Float
Dim PositionY As Float
End Sub
Sub Activity_Create(FirstTime As Boolean)
Label1.Initialize("Label1")
Button1.Initialize("Button1")
Button2.Initialize("Button2")
TransparentPanelOnTop.Initialize("TransparentPanelOnTop")
Label1.Text = "Waiting for click..."
Button1.Text = "I am a Button1 CLICK ME"
Button2.Text = "I am a Button2 CLICK ME"
Activity.AddView(Label1,10,10,Activity.Width - 20,60)
Activity.AddView(Button1,10,100,Activity.Width - 20,60)
Activity.AddView(Button2,10,180,Activity.Width - 20,60)
Activity.AddView(TransparentPanelOnTop,0,0,100%x,100%y)
TransparentPanelOnTop.Color = Colors.Transparent
TransparentPanelOnTop.BringToFront
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub TransparentPanelOnTop_Touch (Action As Int, x As Float, Y As Float) As Boolean 'Return True to consume the event
If Action = Activity.ACTION_DOWN Then
PositionX = x
PositionY = Y
End If
End Sub
Sub Button1_Click
Label1.Text = "You Clicked Button1 with positions : X = " & PositionX & " Y = " & PositionY
End Sub
Sub Button2_Click
Label1.Text = "You Clicked Button2 with positions : X = " & PositionX & " Y = " & PositionY
End Sub