mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 23:59:19 +01:00
Updates to full cover dialog
* Using smaller buttons for save/share * Lowered the left/right margins of the cover * Vertically centered the cover more
This commit is contained in:
parent
464b0eb822
commit
83729d9415
@ -89,16 +89,16 @@ class FullCoverDialog(val controller: MangaDetailsController, drawable: Drawable
|
||||
// begins, it will position the zoomed-in view in the place of the
|
||||
// thumbnail.
|
||||
thumbView.alpha = 0f
|
||||
val defMargin = 16.dpToPx
|
||||
if (Build.VERSION.SDK_INT >= 31) {
|
||||
val defMargin = 8.dpToPx
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||
activity?.window?.decorView?.animateBlur(1f, 20f, 50)?.start()
|
||||
}
|
||||
expandedImageView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||
height = 0
|
||||
width = 0
|
||||
topMargin = defMargin
|
||||
leftMargin = defMargin
|
||||
rightMargin = defMargin
|
||||
topMargin = defMargin + 48.dpToPx
|
||||
marginStart = defMargin
|
||||
marginEnd = defMargin
|
||||
bottomMargin = defMargin
|
||||
horizontalBias = 0.5f
|
||||
verticalBias = 0.5f
|
||||
|
@ -16,24 +16,23 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"/>
|
||||
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/manga_cover_full"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="true"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintVertical_bias="0.0"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_container" />
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
android:id="@+id/manga_cover_full"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="true"
|
||||
tools:src="@mipmap/ic_launcher"
|
||||
android:contentDescription="@string/cover_of_image"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_container"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/button_container"
|
||||
@ -46,7 +45,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_save"
|
||||
style="@style/Widget.Tachiyomi.Button.ActionButton.White"
|
||||
style="@style/Widget.Tachiyomi.Button.ActionButton.White.Landscape"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@ -57,7 +56,7 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_share"
|
||||
style="@style/Widget.Tachiyomi.Button.ActionButton.White"
|
||||
style="@style/Widget.Tachiyomi.Button.ActionButton.White.Landscape"
|
||||
app:layout_constraintStart_toEndOf="@id/btn_save"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -254,6 +254,10 @@
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Tachiyomi.Button.ActionButton.White.Landscape">
|
||||
<item name="iconGravity">start</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Tachiyomi.Button.ActionButton.White">
|
||||
<item name="iconTint">@color/md_white_1000</item>
|
||||
<item name="android:textColor">@color/md_white_1000</item>
|
||||
|
Loading…
Reference in New Issue
Block a user