Action toolbar adjustments (#6353)

* Pair ActionToolbar with ActionMode

This makes ActionToolbar an activity object that can be configured in the
similar way as ActionMode

* Remove action toolbar workaround now that it stays in activity layout

5924

* Set status bar color when action mode is active

6256

* Adjust fab show timing after action mode finished

* Adjust action toolbar layout and animation

Default corner size and use bottom sheet animation

6069

* Adjust action toolbar layout on large screen

Right half of the screen
This commit is contained in:
Ivan Iskandar
2021-12-19 02:16:26 +07:00
committed by GitHub
parent afc80d6a7c
commit 2ed01af723
14 changed files with 318 additions and 226 deletions

View File

@@ -1,35 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.google.android.material.card.MaterialCardView 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:id="@+id/action_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:clipToPadding="false"
android:padding="8dp"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.card.MaterialCardView
<com.google.android.material.appbar.MaterialToolbar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/dialog_radius">
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
app:contentInsetEnd="8dp"
app:contentInsetStart="8dp">
<com.google.android.material.appbar.MaterialToolbar
<androidx.appcompat.widget.ActionMenuView
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_gravity="bottom"
app:contentInsetEnd="8dp"
app:contentInsetStart="8dp">
android:layout_height="match_parent"
android:layout_gravity="center" />
<androidx.appcompat.widget.ActionMenuView
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.appbar.MaterialToolbar>
</com.google.android.material.card.MaterialCardView>
</FrameLayout>
</com.google.android.material.card.MaterialCardView>

View File

@@ -27,13 +27,6 @@
</LinearLayout>
<eu.kanade.tachiyomi.widget.ActionToolbar
android:id="@+id/action_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:layout_dodgeInsetEdges="bottom" />
<eu.kanade.tachiyomi.widget.EmptyView
android:id="@+id/empty_view"
android:layout_width="wrap_content"

View File

@@ -74,6 +74,12 @@
android:id="@+id/fab_layout"
layout="@layout/main_activity_fab" />
<eu.kanade.tachiyomi.widget.ActionModeWithToolbar
android:id="@+id/action_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom" />
<eu.kanade.tachiyomi.widget.TachiyomiBottomNavigationView
android:id="@+id/bottom_nav"
android:layout_width="match_parent"

View File

@@ -33,11 +33,4 @@
app:fastScrollerBubbleEnabled="false"
tools:visibility="visible" />
<eu.kanade.tachiyomi.widget.ActionToolbar
android:id="@+id/action_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:layout_dodgeInsetEdges="bottom" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -27,13 +27,6 @@
app:fastScrollerBubbleEnabled="false"
tools:visibility="visible" />
<eu.kanade.tachiyomi.widget.ActionToolbar
android:id="@+id/action_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:layout_dodgeInsetEdges="bottom" />
<eu.kanade.tachiyomi.widget.EmptyView
android:id="@+id/empty_view"
android:layout_width="wrap_content"