Scrollable Content Inside an HTML Does Not Scroll in Android Emulator or Phone

Vertical Scroll Doesn't work on iOS but works good on Android

It was because I was using hammerjs for swipe gestures to the parent div! Finally fixed it! :')

ScrollView not scrolling at all

Answer: the ScrollView is not working when used as the root element of an XML layout. It has to be wrapped inside a LinearLayout.

Solution then :

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent"
android:layout_height="match_parent" >

<ScrollView android:id="@+id/scroll_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >

<LinearLayout android:id="@+id/scroll_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >

</LinearLayout>
</ScrollView>
</LinearLayout>

Android default browser not scrolling web page

Though it's a hack, I have another fix that might help developers. I found that with the stock Android 2.3.4 browser, if one increases the initial page load size up from "1" to a slightly increased size, vertical scrolling works without having to pinch zoom first. For example:

<meta name="viewport" content="width=device-width, initial-scale=1.02" />


Related Topics



Leave a reply



Submit