Sub Globals
Dim Button1 As Button
Dim Button2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
BringToFront(Button1)
End Sub
Sub BringToFront (v As View)
For i = 0 To Activity.NumberOfViews - 1
If activity.GetView(i) = v Then
activity.RemoveViewAt(i)
activity.AddView(v, v.Left, v.Top, v.Width, v.Height)
Exit
End If
Next
End Sub