hide the top search menu at scrolling

This commit is contained in:
tibbi 2023-01-03 15:38:39 +01:00
parent f5d75dd344
commit 2d6c48cd90
3 changed files with 16 additions and 13 deletions

View File

@ -143,10 +143,12 @@ class MainActivity : SimpleActivity() {
main_menu.setupMenu()
main_menu.onSearchOpenListener = {
search_holder.beVisible()
conversations_fab.beGone()
}
main_menu.onSearchClosedListener = {
search_holder.beGone()
conversations_fab.beVisible()
}
main_menu.onSearchTextChangedListener = { text ->

View File

@ -13,10 +13,10 @@
<RelativeLayout
android:id="@+id/main_nested_scrollview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="?attr/actionBarSize"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none">
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_coordinator_wrapper"
@ -73,15 +73,6 @@
</com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller>
</RelativeLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton
android:id="@+id/conversations_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_plus_vector" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<RelativeLayout
@ -130,4 +121,13 @@
</RelativeLayout>
</RelativeLayout>
<com.simplemobiletools.commons.views.MyFloatingActionButton
android:id="@+id/conversations_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_plus_vector" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -5,7 +5,8 @@
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin">
android:layout_marginEnd="@dimen/activity_margin"
app:layout_scrollFlags="enterAlways|scroll">
<RelativeLayout
android:id="@+id/top_toolbar_holder"