Sub Globals
Dim TabHost1 As TabHost
Dim ListView1 As ListView
End Sub
Sub Activity_Create(FirstTime As Boolean)
TabHost1.Initialize("TabHost1")
ListView1.Initialize("ListView1")
Dim p As Panel
p.Initialize("")
TabHost1.AddTab2("Tab 1", p)
p.AddView(ListView1, 0, 0, -1, -1)
ListView1.FastScrollEnabled = True
Activity.AddView(TabHost1, 0, 0, 100%x, 100%y)
For i = 1 To 4000
ListView1.AddSingleLine(i)
Next
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Splash")
Activity.Title = "My Computer Companion"
'** Find phone resulution
Dim lv As LayoutValues
lv = GetDeviceLayoutValues
ScreenWidth = lv.Width
ScreenHeight = lv.Height
ResizeSystem
ValgtSystem = 0
ValgtTips = 0
'** Initialize
AdView1.Initialize("Ad", "xxxxxxxxxxxxxxx")
Activity.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)
AdView1.LoadAd
End Sub
Sub ResizeSystem
Activity.Width = ScreenWidth
Activity.Height = ScreenHeight
ivSplash.Width = ScreenWidth
ivSplash.Height = ScreenHeight
btnStartMCC.Left = (100%x / 2) - (btnStartMCC.Width / 2)
btnStartMCC.Top = 100%y - btnStartMCC.Height - (ScreenHeight * 0.2)
End Sub
Sub FillSystem
lvSystem.Height = -1
lvSystem.Width = -1
lvSystem.AddSingleLine("Windows XP")
lvSystem.AddSingleLine("Windows Vista")
lvSystem.AddSingleLine("Windows 7")
lvSystem.AddSingleLine("MAC OS-X")
lvSystem.AddSingleLine("Linux")
lvSystem.AddSingleLine("DOS")
End Sub
Sub thMenu_TabChanged
If thMenu.CurrentTab = 1 Then '** Tips & Tricks
lvTips.SingleLineLayout.Label.TextSize = 10
lvTips.Clear
lvTips.Height = -1
lvTips.Width = -1
End If
If thMenu.CurrentTab = 2 Then '** Information
txtInformation.Height = -1
txtInformation.Width = -1
End If
End Sub
Sub btnStartMCC_Click
Activity.RemoveViewAt(0)
Activity.LoadLayout("FirstView")
'** Resize screen
thMenu.Width = 100%x
thMenu.Height = 100%y-50dip
'thMenu.Initialize("thMenu")
thMenu.AddTab("System", "System")
thMenu.AddTab("Tips & Tricks", "Tips")
thMenu.AddTab("Information", "Information")
'** Fill listview
FillSystem
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?