Use an extra container for the margin to be taken into account by the layout_scrollFlags

This commit is contained in:
Benoit Marty 2020-10-04 11:17:57 +02:00
parent 8170f523e0
commit b203093073
1 changed files with 16 additions and 9 deletions

View File

@ -78,6 +78,12 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
<!-- Use an extra container for the margin to be taken into account by the layout_scrollFlags -->
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways|snap">
<androidx.appcompat.widget.SearchView <androidx.appcompat.widget.SearchView
android:id="@+id/searchView" android:id="@+id/searchView"
style="@style/VectorSearchView" style="@style/VectorSearchView"
@ -87,9 +93,10 @@
android:layout_marginBottom="4dp" android:layout_marginBottom="4dp"
android:background="@null" android:background="@null"
android:minHeight="0dp" android:minHeight="0dp"
app:layout_scrollFlags="scroll|enterAlways|snap"
tools:queryHint="@string/search_hint" /> tools:queryHint="@string/search_hint" />
</FrameLayout>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>