#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#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.
Private Button1 As Button
Private EditText1 As EditText
Private Label1 As Label
Private SeekBar1 As SeekBar
Private SeekBar2 As SeekBar
Private SeekBar3 As SeekBar
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("Layout1")
Label1.Initialize("")
Label1.Text = "Lezione 1"
Label1.TextSize=(Label1.Height*50/100)
Label1.TextColor=Colors.Black
Activity.AddView(Label1,10dip,10dip,300dip,50dip)
SeekBar1.Initialize("seekBar1")
SeekBar1.max=100
SeekBar1.Value=50
Activity.AddView(SeekBar1,10dip,160dip,300dip,30dip)
SeekBar2.Initialize("seekBar2")
SeekBar2.Max=255
SeekBar2.Value=255
Activity.AddView(SeekBar2,10dip,200dip,300dip,30dip)
SeekBar3.Initialize("seekBar3")
SeekBar3.Max=255
SeekBar3.Value=0
Activity.AddView(SeekBar3,10dip,240dip,300dip,30dip)
EditText1.Initialize("EditText1")
EditText1.Text = "Prova a divertirti"
Activity.AddView(EditText1,10dip,340dip,300dip,30dip)
Button1.Initialize("EditText1")
Button1.Text = "Print Label"
Activity.AddView(Button1,10dip,380dip,300dip,40dip)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub SeekBar3_ValueChanged (Value As Int, UserChanged As Boolean)
Label1.Color=Colors.ARGB(255,Value,255-Value,Value)
End Sub
Sub SeekBar2_ValueChanged (Value As Int, UserChanged As Boolean)
Label1.TextColor = Colors.ARGB(255,Value,255-Value,Value)
End Sub
Sub SeekBar1_ValueChanged (Value As Int, UserChanged As Boolean)
Label1.TextSize=(Label1.Height*Value/100)
End Sub
Sub Button1_Click
Label1.text = EditText1.Text
End Sub