Hello everyone, I'm making a small internet browser, open the browser as the default page I added google, I'm having problems when I orient the screen, if they are horizontal, with a webpage, for example: index, This page is displayed correctly, but if I move the phone in an upright position, I get only the page of google, how do I get to the same page even when I change the screen orientation?
small part of the code:
small part of the code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("browser")
txt1.Text= "http://www."
If Activity.Width > Activity.Height Then
imgback.SetLayout(0%x,0%y,10%x,10%y)
imgforward.SetLayout(13%x,0%y,10%x,10%y)
imgrefresh.SetLayout(26%x,0%y,10%x,10%y)
imgspeek.SetLayout(53%x,0%y,10%x,10%y)
imgset.SetLayout(67%x,0%y,10%x,10%y)
imgstop.SetLayout(40%x,0%y,10%x,10%y)
sp1.SetLayout(80%x,0%y,9%x,11%y)
imggo.SetLayout(90%x,11%y,8%x,11%y)
txt1.SetLayout(0%x,10%y,89%x,13%y)
WebView1.SetLayout(0%x,24%y,100%x,76%y)
Else
imgback.SetLayout(0%x,0%y,10%x,7%y)
imgforward.SetLayout(13%x,0%y,10%x,7%y)
imgrefresh.SetLayout(26%x,0%y,10%x,7%y)
imgspeek.SetLayout(53%x,0%y,10%x,7%y)
imgset.SetLayout(69%x,0%y,10%x,7%y)
imgstop.SetLayout(40%x,0%y,10%x,7%y)
sp1.SetLayout(85%x,0%y,14%x,8%y)
imggo.SetLayout(87%x,8%y,12%x,7%y)
txt1.SetLayout(0%x,7%y,85%x,9%y)
WebView1.SetLayout(0%x,16%y,100%x,73%y)
End If
voice1.Initialize("voice1")
tts1.Initialize("tts1")
timer1.Initialize("timer1",2000)
WebView1.LoadUrl("http://www.google.it")
End Sub