#Region Project Attributes
#ApplicationLabel: Slide Button
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: true
#End Region
#Region Activity Attributes
#FullScreen: false
#IncludeTitle: True
#End Region
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 but1 As ImageView
Dim set1 = 0 As Int
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("slide")
but1.SetLayout(42%x, 5%y, 16%x, 5%y)
but1.Bitmap = LoadBitmap(File.DirAssets, "but 2 OFF.png")
End Sub
Sub but1_Click
set1=set1+1
If set1=1 Then
but1.Bitmap = LoadBitmap(File.DirAssets, "but 2 ON.png")
'your ON Sub
Else
set1=0
but1.Bitmap = LoadBitmap(File.DirAssets, "but 2 OFF.png")
'your OFF Sub
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub