Android 此ScrollView布局或其RelativeLayout父级无效

Android 此ScrollView布局或其RelativeLayout父级无效,android,Android,我正在做我的新项目。我是Android开发的新手。当我使用这段代码时,它说“这个ScrollView布局或它的RelativeLayout父级是无用的”。我怎样才能解决这个问题 <ScrollView android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginBottom="3dp"> <RelativeLayout android:lay

我正在做我的新项目。我是Android开发的新手。当我使用这段代码时,它说“这个ScrollView布局或它的RelativeLayout父级是无用的”。我怎样才能解决这个问题

<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="3dp">

<RelativeLayout
    android:layout_width="match_parent"
    android:background="#000"
    android:orientation="vertical"
    android:layout_height="wrap_content" >

    <TextView
        android:id="@+id/description_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:maxLines="5"
        android:text="@string/desc_content" />

    <ImageButton
        android:id="@+id/show"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:contentDescription="@string/Rom_Baslik"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/description_text"
        android:background="@drawable/arrowdown"
        android:clickable="true" />

    <View
        android:id="@+id/view1"
        android:layout_width="wrap_content"
        android:layout_height="2dp"
        android:layout_below="@+id/description_text"
        android:layout_marginTop="5dp"
        android:layout_toLeftOf="@+id/show"
        android:background="#000" />

    <ImageButton
        android:id="@+id/hide"
        android:layout_width="wrap_content"
        android:contentDescription="@string/Rom_Baslik"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_below="@+id/description_text"
        android:background="@drawable/ic_collapse_small_holo_light"
        android:clickable="true"
        android:visibility="invisible" />
</RelativeLayout>

我想要ExpandableTextView:/

如果一个视图组的唯一子视图是另一个
视图组,则会使其中一个视图组无效


要解决您的问题,请删除父级
RelativeLayout

,它只是一个提示,上面写着“可能没用”。因为它可能是,您以编程方式创建布局元素。但是,如果不这样做,请删除
RelativeLayout
父项。