android - Scroll issue when placing an webview within a scrollview -


i having issue scrooling of webview when have placed webview within scroll view whch inturn under frame layout

below mentioned layout requirement

<relativelayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     tools:context=".websampleactivity" >      <framelayout         android:layout_width="fill_parent"         android:layout_height="fill_parent" >          <scrollview             android:layout_width="fill_parent"             android:layout_height="fill_parent"              android:id="@+id/scroll_view">              <linearlayout                 android:layout_width="fill_parent"                 android:layout_height="fill_parent"                  android:orientation="vertical">                    <button                       android:id="@+id/button_view"                     android:layout_width="fill_parent"                     android:layout_height="wrap_content"                     android:text="button" />                 <webview                     android:id="@+id/web_view"                     android:layout_width="fill_parent"                     android:layout_height="fill_parent"                     android:clickable="true"                     android:focusableintouchmode="true"                     android:onclick="true"                      />               </linearlayout>         </scrollview>     </framelayout>  </relativelayout> 

in above example when touch webview area conent gets scrolled bellow button placed in layout

could please tell me how handle isuue. need conent in webview move till button area

i'm not sure i've understood issue, but, try change linearlayout param to:

   <scrollview         android:layout_width="fill_parent"         android:layout_height="fill_parent"          android:id="@+id/scroll_view">          <linearlayout             android:layout_width="wrap_content"             android:layout_height="wrap_content"              android:orientation="vertical">                <button                   android:id="@+id/button_view"                 android:layout_width="fill_parent"                 android:layout_height="wrap_content"                 android:text="button" />             <webview                 android:id="@+id/web_view"                 android:layout_width="fill_parent"                 android:layout_height="fill_parent"                 android:clickable="true"                 android:focusableintouchmode="true"                 android:onclick="true"                  />           </linearlayout>     </scrollview> 

i think can work.

if want don't loss button, must change linearlayout , scrollview.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -