android - WebView in ScrollView prevents all scrolling -


i want to:

  1. put fragment on screen, contains:
    1. a webview
    2. ...expanded full height
    3. embedded in layout of fixed size above , below
    4. scroll layout (i.e. whole thing, including full-height webview)

this seems impossible. i've read 10+ different questions/answers on so, of them covering different critical bugs in android webview, none of them covering situation.

it seems (from reading other questions, , following links current unfixed bugs on android site) that:

  1. webview's height has been wrong (unfixed android 2 - 4: e.g. height never decreases)
  2. webview's scrolling breaks, un-breaks, re-breaks in new ways in successive android releases (e.g: releases scrollview takes control, others webview takes control, others "fight" , stuttering, etc)
  3. you have use bizarre tweaks scrollview make it's supposed out-of-the-box. e.g. "android:fillviewport="true" (huh? isn't "layout_height=fill_parent" supposed do?)

does have working code achieve relatively simple , common setup? i'd interested in works (except, of course "throw away android app , write webapp". might work, unrealistic, sadly)

for reference (and else trying similar) here's layout fills screen, scrolling disabled, no reason can see:

<scrollview xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:fillviewport="true" >      <relativelayout         android:layout_width="fill_parent"         android:layout_height="wrap_content">          <!-- page header -->          <relativelayout             android:id="@+id/fragment_detailspage_titletext_layout"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:clickable="true"             android:visibility="visible" >              <include                 android:id="@+id/fragment_detailspage_titletext_include"                 layout="@layout/include_textheader"                 android:visibility="visible" />         </relativelayout>          <relativelayout             android:id="@+id/fragment_detailspage_header_layout"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_below="@id/fragment_detailspage_titletext_layout"             android:clickable="true"             android:visibility="visible" >              <!-- logo image -->              <include                 android:id="@+id/fragment_detailspage_logoimageheader_include"                 layout="@layout/include_logoimageheader" />         </relativelayout>          <!-- page footer -->          <relativelayout             android:id="@+id/fragment_detailspage_footer_layout"             android:layout_width="fill_parent"             android:layout_height="64dp"             android:layout_alignparentbottom="true"             android:background="@drawable/generic_button_not_pressed"             android:clickable="true"             android:visibility="visible" >              <!-- 1 buttons -->              <include                 android:id="@+id/fragment_detailspage_bottombuttonstrip1_include"                 android:layout_width="wrap_content"                 android:layout_height="64dp"                 android:layout_centerhorizontal="true"                 layout="@layout/include_bottombuttonstrip1" />         </relativelayout>          <!-- page content -->          <webview             android:id="@+id/fragment_detailspage_content_web"             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_above="@id/fragment_detailspage_footer_layout"             android:layout_below="@id/fragment_detailspage_header_layout"             android:visibility="visible" />      </relativelayout>  </scrollview> 

sorry image below, imagine every time, when want put scrollable view inside scrollable view.

enter image description here

please try use customscrollview , override onintercepttouchevent:

public class customscrollview extends scrollview {      public customscrollview(context context) {         super(context);     }      public customscrollview(context context, attributeset attrs) {         super(context, attrs);     }      public customscrollview(context context, attributeset attrs, int defstyle) {         super(context, attrs, defstyle);     }      @override     public boolean onintercepttouchevent(motionevent e) {         super.onintercepttouchevent(e);         return false;     }   } 

Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -