Android Question Webview and Galaxy Tab 10.1

FranckB

Member
Licensed User
Longtime User
Hi all,

I could not have a simple webview working on my galaxy tab 10.1 (android v 4.0.4)
No page shown ( but log return the url )

The same project work on my phone.

B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private WebView1 As WebView
    Private Button1 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("mainLayout")
    Log("debut")
WebView1.LoadUrl("http://www.google.fr/")
    Log(WebView1.Url)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub WebView1_PageFinished (Url As String)
    Log(WebView1.Url)
   
End Sub
Sub WebView1_OverrideUrl (Url As String) As Boolean
   
End Sub
Sub Button1_Click
    WebView1.LoadUrl(WebView1.url)
End Sub

Any idea to help me?
Thanks by advance.
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Firstly, what views are in the layout (I guess a webview and a button)?
Secondly, what is the purpose of the button?
 
Upvote 0

FranckB

Member
Licensed User
Longtime User
Hi Mark,
Thanks for your reply.
This is just a simple project to test the webview and find that is the problem with this tablet.
There is only the 2 views in the laout as you said.
The button is just here to test if the webview show the page when "refresh" ( reload the same URL when clicking the button)
Same problem, the page is not show on the galaxy tab...

Regards.

EDIT : I join the project as you can test it on your Tab 10.1
 

Attachments

  • ustrap.zip
    12.1 KB · Views: 268
Last edited:
Upvote 0

FranckB

Member
Licensed User
Longtime User
Hi all,

I just find that :
When i drag the screen with my finger in the "webview screen zone" ( but only bottom to top ) , the page is shown...
Curious !!
Seems to be a sreen refresh pb...
After that, all seems to work...

Sorry for my bad English, i'm a poor french guy...
 
Upvote 0

FranckB

Member
Licensed User
Longtime User
Hi all,

I have resolved this problem by hidding/showing the webview like this :

B4X:
Sub WebView1_PageFinished (Url As String)
Log(WebView1.Url)
WebView1.Visible=False
WebView1.Visible=True
End Sub

Regards
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…