Bottom sheet adjustments

This commit is contained in:
Zakhar Timoshenko
2023-06-04 13:55:06 +03:00
parent bece4cc15d
commit 32695f9816
5 changed files with 11 additions and 3 deletions

View File

@@ -201,7 +201,7 @@ class DetailsActivity :
val toolbar = viewBinding.toolbarChapters ?: return
if (isAnimationsEnabled) {
val transition = AutoTransition()
transition.duration = getAnimationDuration(R.integer.config_tinyAnimTime)
transition.duration = getAnimationDuration(R.integer.config_shorterAnimTime)
TransitionManager.beginDelayedTransition(toolbar, transition)
}
if (isExpanded) {

View File

@@ -55,6 +55,7 @@
android:orientation="vertical">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
style="@style/Widget.Kotatsu.BottomSheet.DragHandle"
android:id="@+id/dragHandle"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

View File

@@ -9,6 +9,7 @@
tools:parentTag="android.widget.LinearLayout">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
style="@style/Widget.Kotatsu.BottomSheet.DragHandle"
android:id="@+id/sh_dragHandle"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -41,6 +41,7 @@
<dimen name="bottom_sheet_width">0dp</dimen>
<dimen name="bottom_sheet_handle_size_min">16dp</dimen>
<dimen name="bottom_sheet_handle_size_max">24dp</dimen>
<dimen name="bottom_sheet_corner_radius">28dp</dimen>
<dimen name="dialog_radius">8dp</dimen>
<dimen name="card_indicator_size">32dp</dimen>

View File

@@ -45,10 +45,15 @@
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Kotatsu.BottomSheet</item>
</style>
<style name="Widget.Kotatsu.BottomSheet.DragHandle" parent="Widget.Material3.BottomSheet.DragHandle">
<!-- Fix weird bottom padding -->
<item name="android:paddingBottom">0dp</item>
</style>
<style name="ShapeAppearanceOverlay.Kotatsu.BottomSheet" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopRight">@dimen/dialog_radius</item>
<item name="cornerSizeTopLeft">@dimen/dialog_radius</item>
<item name="cornerSizeTopRight">@dimen/bottom_sheet_corner_radius</item>
<item name="cornerSizeTopLeft">@dimen/bottom_sheet_corner_radius</item>
<item name="cornerSizeBottomRight">0dp</item>
<item name="cornerSizeBottomLeft">0dp</item>
</style>