Android Question WebViews and loading more at end of a webPage

socialnetis

Active Member
Licensed User
Longtime User
Hi, there are some mobile version of web pages that when you hit the bottom of the page while scrolling, it automatically loads more elements.
Some examples are http://www.reddit.com/.compact and http://m.9gag.com/

The mobile browsers like opera and chrome for android, behave as expected when reaching the bottom of the page.
However, I can't get this behaviour with webviews. When I scroll to the end of the page, nothing happens, I need to manually press a "load more" button.

I assume that this is some sort of javascript-related problem, I'm using the JavaScriptEnabled option at true value:

B4X:
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
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("Main")
    WebView1.LoadUrl("http://www.reddit.com/.compact")
    WebView1.ZoomEnabled = False
    WebView1.JavaScriptEnabled = True
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub WebView1_PageFinished (Url As String)
    Log(Url)
End Sub
Sub WebView1_OverrideUrl (Url As String) As Boolean
    Log("Overriding: " & Url)
End Sub

Is there anything wrong that I'm doing?
 
Top