#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: ScrollViewBigPanel
#VersionCode: 1
#VersionName:
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
'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.
'########### SLIDE Menue ############
Private sm As SlidingMenu
Private ic1Menu As ImageView
Private ic2Menu As ImageView
Private ic3Menu As ImageView
Private ic4Menu As ImageView
Private ic5Menu As ImageView
Private ic6Menu As ImageView
Private btactionmenu As ImageView
Private lb1Menu As Label
Private lb2Menu As Label
Private lb3Menu As Label
Private lb4Menu As Label
Private lb5Menu As Label
Private lb6Menu As Label
Private pArka01Menue As Panel
Private pArka02Menue As Panel
Private pArka03Menue As Panel
Private pArka04Menue As Panel
Private pArka05Menue As Panel
Private pArka06Menue As Panel
Private lbProfilInfo As Label
Private ScrollView3 As ScrollView
Private Panel1 As Panel
'#####################################
Private btnCreateConnection As Button
Private btnInput As Button
Private btnOutput As Button
Private btnSettings As Button
Private btnSwitchALLOFF As Button
Private btnSwitchALLON As Button
Private pArka01BeyazMenue As Panel
Private pArka02BeyazMenue As Panel
Private pArka03BeyazMenue As Panel
Private pArka04BeyazMenue As Panel
Private pArka05BeyazMenue As Panel
Private pArka06BeyazMenue As Panel
Private lbEmailMenu As Label
Private lbNamen_Kurzel As Label
Private pRedondoMenu As Panel
Private pVerdeMenu As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
'####################### SLIDE MENUE #############################
sm.Initialize("sm")
Dim offset As Int = 22%x
sm.BehindOffset = offset
sm.Mode = sm.LEFT
sm.Menu.LoadLayout("LM_Input_Output")
Dim jo As JavaObject = sm
Dim Gradient1 As GradientDrawable
Dim Clrs(2) As Int
Clrs(0) = Colors.ARGB(0,0,0,0)
Clrs(1) = Colors.ARGB(50,0,0,0)
Gradient1.Initialize("LEFT_RIGHT", Clrs)
jo.RunMethod("setShadowDrawable", Array(Gradient1))
jo.RunMethod("setShadowWidth", Array(4%x))
'Vorbereitung der Menütasten
Dim jo As JavaObject = sm
jo.RunMethod("setTouchmodeMarginThreshold", Array(50%x))
'Wir machen die Veranstaltung zum Öffnen (wissen, wann das Menü geöffnet ist)
Dim jo2 As JavaObject = sm
Dim event As Object = jo2.CreateEventFromUI("com.jeremyfeinstein.slidingmenu.lib.SlidingMenu$OnOpenListener", "Open", Null)
jo2.RunMethod("setOnOpenListener", Array(event))
'WIR WÄHLEN DAS SCHLIESSENDE EREIGNIS (WISSEN, WENN DAS MENÜ GEÖFFNET IST)
Dim jo3 As JavaObject = sm
Dim event As Object = jo3.CreateEventFromUI("com.jeremyfeinstein.slidingmenu.lib.SlidingMenu$OnCloseListener", "Close", Null)
jo3.RunMethod("setOnCloseListener", Array(event))
ScrollView3.Panel.LoadLayout("ScrollviewLayout")
ScrollView3.Panel.Height = Panel1.Height
ICONS_Laden
'#################################################################
End Sub
Sub ICONS_Laden
AjustaImageView(btactionmenu,File.DirAssets,"menu.png")
AjustaImageView(ic1Menu,File.DirAssets,"menu.png")
AjustaImageView(ic2Menu,File.DirAssets,"menu.png")
AjustaImageView(ic3Menu,File.DirAssets,"menu.png")
AjustaImageView(ic4Menu,File.DirAssets,"menu.png")
AjustaImageView(ic5Menu,File.DirAssets,"menu.png")
AjustaImageView(ic6Menu,File.DirAssets,"menu.png")
Schriftarten_Laden
End Sub
Sub AjustaImageView(Imv As ImageView, Dir As String, FileName As String)
Private bmp As Bitmap = LoadBitmap(Dir, FileName)
Dim Delta, Height, Width As Int
If bmp.Width / bmp.Height > Imv.Width / Imv.Height Then
Height = bmp.Height / bmp.Width * Imv.Width
Delta = (Imv.Height - Height) / 2
Imv.Height = Height
Imv.Top = Imv.Top + Delta
Else
Width = bmp.Width / bmp.Height * Imv.Height
Delta = (Imv.Width - Width) / 2
Imv.Width = Width
Imv.Left = Imv.Left + Delta
End If
Imv.Gravity = Gravity.FILL
Imv.Bitmap = bmp
End Sub
Sub Schriftarten_Laden
Private cs As CSBuilder
cs.Initialize
cs.Append("Test").Size(20).Bold.Append(",").PopAll
cs.Append(CRLF).PopAll
cs.Append("Mustermann").Size(10).Bold.PopAll
lbProfilInfo.Text = cs
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub