내 프로젝트에서 MaterialSearchView를 사용하고 있습니다.Android MaterialSearchView overlap
https://github.com/MiguelCatalan/MaterialSearchView. 나는 안드로이드 Studio를 제공하여 탐색 창 Activiti을 만드는거야
는, 기본 XML은 AppBarLayout을 포함 CoordinatorLayout을 사용하고 있습니다. 그러나 MaterialSearchView 라이브러리와 통합 할 때는 제안 사항은입니다. 나는 그들의 샘플 xml에서 RelativeLayout을 사용하고 있음을 발견했다. RelativeLayout으로 변경하면 제안 사항이 잘 표시됩니다. 그러나 FrameLayout 및 AppLayout은 이 서로 겹치고 인 것처럼 보입니다. 검색 메뉴 항목을 클릭하고 닫은 다음 잘 보입니다.
https://github.com/MiguelCatalan/MaterialSearchView/issues/141이
이 사람이 나를 도울 수 :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.toe.shareyourcuisine.activity.MainActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<FrameLayout
android:id="@+id/toolbar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/AppTheme.PopupOverlay"/>
<com.miguelcatalan.materialsearchview.MaterialSearchView
android:id="@+id/search_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</FrameLayout>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"/>
</RelativeLayout>
은 또한이 링크에서 내 문제를 게시 :
현재 코드입니다 (아래 사진을 확인) 알아 낸거야?