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