我有以下布局
<LinearLayout
android:divider="@color/red"
android:showDividers="middle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
...
</LinearLayout>
</LinearLayout>
一些子线性布局具有可见性
gone
但是分隔符仍然显示是什么导致多个分隔符一个接一个地显示而没有任何内容。
有没有办法隐藏隐藏元素的分隔线?