我使用了一种底页纸,其底页纸的行为像是展开和折叠,但是在折叠后,某些布局仍保留在背景中并造成了布局故障
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/layoutSearch"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/edSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginTop="@dimen/size10"
android:background="@drawable/search_ed_bg"
android:hint="@string/type_search"
android:imeOptions="actionDone"
android:singleLine="true"
android:lines="1"
android:inputType="text"
android:padding="@dimen/size10" />
<ImageView
android:id="@+id/closeSearch"
android:layout_marginRight="@dimen/size10"
android:layout_width="@dimen/size30"
android:layout_height="@dimen/size30"
android:layout_alignParentRight="true"
android:layout_centerInParent="true"
android:src="@android:drawable/ic_menu_close_clear_cancel" />
</RelativeLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/size80"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
<TextView
android:id="@+id/tvNoText"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="No Songs Added in Favourite"
android:visibility="gone" />
</LinearLayout>
我遇到这种小故障,不知道为什么