﻿Build1=Default,VictoryCraftRanking.example
File1=Main.bal
File2=ScrollViewLayout.bal
File3=wczytywanie.png
FileGroup1=Default Group
FileGroup2=Default Group
FileGroup3=Default Group
Group=Default Group
Library1=core
Library2=httputils2
Library3=mlwifi
Library4=phone
ManifestCode=
Module1=ImageDownloader
NumberOfFiles=3
NumberOfLibraries=4
NumberOfModules=1
Version=10.9
@EndOfDesignText@
#Region Module Attributes
	#FullScreen: False
	#IncludeTitle: True
	#ApplicationLabel: Paliwa w Krakowie
	#VersionCode: 1
	#VersionName: 
	#SupportedOrientations: portrait
	#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.
	Dim wifi As MLwifi
	
	
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 scvTest As ScrollView
	Dim pnlTest As Panel
	
	Dim p As PhoneIntents

	Private ImageView1 As ImageView
	 
	
	
	Private WebView1 As WebView
	 
	Private Button1 As Button
	Private WebView2 As WebView
	Private Button2 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
	Activity.LoadLayout("Main")
	scvTest.Panel.LoadLayout("ScrollViewLayout")
	If Not(wifi.isWifiConnected) Then
		wifi.EnableWifi(True)
	
	End If
	
	scvTest.Panel.Height = pnlTest.Height
	
	scvTest.Width = Activity.Width
	
	pnlTest.Width = Activity.Width
	ImageView1.Width = Activity.Width
	
	If FirstTime Then
		WebView1.LoadURL("http://www.jaglarz.info/android/CARanking/licznik.php")
		
	End If
	
	Button1.Color=Colors.ARGB(255,255,214,0)
	Button2.Color=Colors.ARGB(255,255,214,0)
	Button2.Height = Button1.Height
	Button1.Width = Activity.Width / 2
	Button2.Width = Button1.Width
	Button1.Left = 0
	Button2.Left = Button2.Width + 1
	'WebView2.LoadURL("http://www.jaglarz.info/android/CARanking/strona.htm")
	WebView2.Width = Activity.Width
	
	  
	
End Sub

Sub Activity_Resume
	Dim links As Map
	links.Initialize
	links.Put(ImageView1, "http://www.jaglarz.info/android/CARanking/naglowek.png")
	 
	CallSubDelayed2(ImageDownloader, "Download", links)
	
End Sub

Sub Activity_Pause (UserClosed As Boolean)
	CallSub(ImageDownloader, "ActivityIsPaused")
End Sub




Sub edtItem_FocusChanged (HasFocus As Boolean)
	Dim Send As EditText
	
	If HasFocus Then
		Send = Sender
		
		scvTest.ScrollPosition = Send.Top - 10dip
	End If
End Sub

 




 





Sub Button1_Click
	StartActivity(p.OpenBrowser("http://craftapple.pl/zbanowani"))
End Sub

Sub Button2_Click
	StartActivity(p.OpenBrowser("https://craftapple.pl/sklep/"))
End Sub