[app] Add compressing toolbar to app list

This commit is contained in:
NekoInverter 2021-10-14 19:32:21 +08:00 committed by LoveSy
parent dfee8f04d6
commit d520b41cdb
3 changed files with 17 additions and 14 deletions

View File

@ -39,24 +39,18 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize" android:minHeight="?attr/actionBarSize"
android:elevation="0dp" /> android:elevation="0dp"
app:layout_scrollFlags="scroll|enterAlways"
</com.google.android.material.appbar.AppBarLayout> app:layout_scrollEffect="compress" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="?actionBarSize"
app:fitsSystemWindowsInsets="top"
tools:ignore="MissingPrefix">
<rikka.widget.switchbar.SwitchBar <rikka.widget.switchbar.SwitchBar
android:id="@+id/master_switch" android:id="@+id/master_switch"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="match_parent" android:layout_width="match_parent"
app:switchOnText="@string/enable_module" app:switchOnText="@string/enable_module"
app:switchOffText="@string/enable_module" /> app:switchOffText="@string/enable_module"
app:layout_scrollFlags="scroll|enterAlways"
app:layout_scrollEffect="compress" />
<com.google.android.material.progressindicator.LinearProgressIndicator <com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/progress" android:id="@+id/progress"
@ -65,6 +59,15 @@
android:indeterminate="true" android:indeterminate="true"
app:hideAnimationBehavior="outward" /> app:hideAnimationBehavior="outward" />
</com.google.android.material.appbar.AppBarLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:ignore="MissingPrefix">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

View File

@ -34,6 +34,7 @@
android:fitsSystemWindows="true"> android:fitsSystemWindows="true">
<com.google.android.material.appbar.CollapsingToolbarLayout <com.google.android.material.appbar.CollapsingToolbarLayout
style="?attr/collapsingToolbarLayoutMediumStyle"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/collapsingToolbarLayoutMediumSize" android:layout_height="?attr/collapsingToolbarLayoutMediumSize"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap"> app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">

View File

@ -24,8 +24,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:clipToPadding="false" android:clipToPadding="false"
android:clipChildren="false" android:clipChildren="false"
android:paddingTop="104dp" app:fitsSystemWindowsInsets="bottom">
app:fitsSystemWindowsInsets="top|bottom">
<rikka.widget.borderview.BorderNestedScrollView <rikka.widget.borderview.BorderNestedScrollView
android:id="@+id/scrollView" android:id="@+id/scrollView"