I have a simple App that shows several websites and the orientation is set permanently to Landscape.
Everything works fine apart from when you turn the phone/tablet off and turn it on at a later date the App is blank??
Can anyone help, code is below...
Everything works fine apart from when you turn the phone/tablet off and turn it on at a later date the App is blank??
Can anyone help, code is below...
B4X:
#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#VersionCode: 1
#VersionName:
#SupportedOrientations: landscape
#CanInstallToExternalStorage: True
#End Region
#Region Module Attributes
#FullScreen: True
#IncludeTitle: False
#ApplicationLabel: Brapp
#VersionCode: 2
#VersionName:
#SupportedOrientations: landscape
#CanInstallToExternalStorage: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim page As String
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 WebView1 As WebView
Dim btnDown1 As Button
Dim btnDown2 As Button
Dim btnDown3 As Button
Dim pnlLower As Panel
Dim btnDatabase As Button
Dim ImageView1 As ImageView
Dim btnBack As Button
Dim btnForward As Button
Dim btnMain As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
WebView1.Initialize("brass_band_Click")
Activity.LoadLayout("brass_band")
WebView1.LoadURL("http://www.bishmedia.co.uk/default/Apps/index.php")
End If
End Sub
Sub btnDown1_Click
WebView1.LoadURL("http://www.4barsrest.com")
UpdateView
CloseMainButtons
End Sub
Sub btnDown2_Click
WebView1.LoadURL("http://www.britishbandsman.com")
UpdateView
CloseMainButtons
End Sub
Sub btnDown3_Click
WebView1.LoadURL("http://www.themouthpiece.com")
UpdateView
CloseMainButtons
End Sub
Sub btnDatabase_Click
WebView1.LoadURL("http://www.bishmedia.co.uk/default/Apps/selectbycompetition.php")
UpdateView
End Sub
Sub btnMain_click
ShowMainButtons
End Sub
Sub UpdateView
Dim WebViewSettings1 As WebViewSettings
WebViewSettings1.setDefaultZoom(WebView1, "FAR")
WebViewSettings1.setLoadWithOverviewMode(WebView1, True)
WebViewSettings1.setUseWideViewPort(WebView1, True)
End Sub
Sub CloseMainButtons
btnDown1.Visible = False
btnDown2.Visible = False
btnDown3.Visible = False
btnDatabase.Visible = False
btnBack.Visible = True
btnForward.Visible = True
btnMain.Visible = True
End Sub
Sub ShowMainButtons
btnDown1.Visible = True
btnDown2.Visible = True
btnDown3.Visible = True
btnDatabase.Visible = True
btnBack.Visible = False
btnForward.Visible = False
btnMain.Visible = False
End Sub