2013-04-18 50 views
0

我有web視圖的Scrolling的問題中,當我已經放置在滾動視圖界河inturn是下一個幀佈局滾動問題放置一個網頁視圖當滾動視圖

下面內的網頁視圖是對於所提到的佈局我的要求

<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> 

在上面的例子中,當我撫摸我的conent獲取滾動波紋管這是擺在佈局

誰能告訴我如何處理這種isuue按鈕web視圖區域。 我需要在web視圖的conent只有移動,直到按鈕區域

+0

請問您能更清楚一點嗎? –

回答

0

我不知道我理解你的問題,但是,嘗試將的LinearLayout PARAM更改爲:

<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> 

我想它可以工作。

如果您不想丟失按鈕,您必須更改LinearLayout和ScrollView。