使linearlayout可滚动

fis*_*h40 1 android

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    style="@style/bag" 
    android:layout_height="fill_parent" android:layout_width="fill_parent"
    android:orientation="vertical">

    <LinearLayout
            android:id="@+id/relativeLayout2"
        style="@style/relbag"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        >

        <TextView style="@style/CodeFont" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content"
        android:layout_marginLeft="25dp"
        android:layout_marginTop="18dp"
        android:textSize="15dp"
        android:text="General Preference">
        </TextView>
    </LinearLayout>

    <ListView
        android:id="@+id/settingsListView1"
        style="@style/listbag"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="15dip"
        android:layout_marginRight="15dip"
        android:layout_weight="100"
        android:background="@drawable/radius"
        android:listSelector="@drawable/list_selector"
        android:paddingTop="8dip"
        android:paddingBottom="8dip" 
        android:scrollbars="none"/>

    <LinearLayout
        android:id="@+id/relativeLayout2"
        style="@style/relbag"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        >

        <TextView style="@style/CodeFont" 
        android:layout_height="wrap_content" 
        android:layout_width="wrap_content"
        android:layout_marginLeft="25dp"

        android:textSize="15dp"
        android:text="Notification Preference">
        </TextView>
    </LinearLayout>

        <ListView style="@style/listbag" android:id="@+id/settingsListView2" android:layout_width="fill_parent"
         android:layout_height="wrap_content" android:layout_weight="100"
            android:layout_marginLeft="15dip" android:layout_marginRight="15dip" 
              android:layout_marginBottom="15dip" 
        android:background="@drawable/radius" 
            android:paddingLeft="5dip" android:paddingRight="5dip" 
            android:paddingTop="15dip" android:paddingBottom="15dip" 
            android:listSelector="@drawable/list_selector"  />

</LinearLayout>
Run Code Online (Sandbox Code Playgroud)

我想让LinearLayout可滚动,但我不知道在这里有什么用,我试过ScrollView但它不起作用.我只想在LinearLayout中使用滚动而不是在listview中.我想让parnet布局可滚动.你可以给我这样做的建议吗?

New*_*wts 8

像这样放Scrollview

<LinearLayout>
<ScrollView>
 <LinearLayout>
       Your layouts
 </LinearLayout>
 </ScrollView>
 </LinearLayout>
Run Code Online (Sandbox Code Playgroud)