hide shared items toolbar on scroll

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-04-29 18:48:22 +02:00
parent bc0b4143e7
commit 5370202af6
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -19,7 +19,7 @@
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
@ -27,14 +27,18 @@
android:background="@color/bg_default"
tools:context=".activities.SharedItemsActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/shared_items_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/shared_items_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/appbar"
android:theme="?attr/actionBarPopupTheme"
app:layout_constraintTop_toTopOf="parent"
app:layout_scrollFlags="enterAlwaysCollapsed|noScroll"
app:layout_scrollFlags="scroll|enterAlways"
app:navigationIconTint="@color/fontAppbar"
app:popupTheme="@style/appActionBarPopupMenu"
app:titleTextColor="@color/fontAppbar"
@ -45,22 +49,19 @@
android:layout_width="match_parent"
android:layout_height="@dimen/min_size_clickable_area"
android:background="@color/appbar"
app:layout_constraintTop_toBottomOf="@id/shared_items_toolbar"
app:tabGravity="fill"
app:tabMode="fixed"
app:tabMaxWidth="0dp"
app:tabTextAppearance="@style/TextAppearanceTab" />
</com.google.android.material.appbar.AppBarLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/image_recycler"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/shared_items_tabs"
android:layout_marginTop="@dimen/double_margin_between_elements"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/shared_item_grid" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>