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
|
// begins, it will position the zoomed-in view in the place of the
|
||||||
// thumbnail.
|
// thumbnail.
|
||||||
thumbView.alpha = 0f
|
thumbView.alpha = 0f
|
||||||
val defMargin = 16.dpToPx
|
val defMargin = 8.dpToPx
|
||||||
if (Build.VERSION.SDK_INT >= 31) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
activity?.window?.decorView?.animateBlur(1f, 20f, 50)?.start()
|
activity?.window?.decorView?.animateBlur(1f, 20f, 50)?.start()
|
||||||
}
|
}
|
||||||
expandedImageView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
expandedImageView.updateLayoutParams<ConstraintLayout.LayoutParams> {
|
||||||
height = 0
|
height = 0
|
||||||
width = 0
|
width = 0
|
||||||
topMargin = defMargin
|
topMargin = defMargin + 48.dpToPx
|
||||||
leftMargin = defMargin
|
marginStart = defMargin
|
||||||
rightMargin = defMargin
|
marginEnd = defMargin
|
||||||
bottomMargin = defMargin
|
bottomMargin = defMargin
|
||||||
horizontalBias = 0.5f
|
horizontalBias = 0.5f
|
||||||
verticalBias = 0.5f
|
verticalBias = 0.5f
|
||||||
|
@ -16,24 +16,23 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"/>
|
android:layout_height="0dp"/>
|
||||||
|
|
||||||
<com.google.android.material.imageview.ShapeableImageView
|
<com.google.android.material.imageview.ShapeableImageView
|
||||||
android:id="@+id/manga_cover_full"
|
android:id="@+id/manga_cover_full"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:scaleType="fitCenter"
|
android:scaleType="fitCenter"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
tools:src="@mipmap/ic_launcher"
|
tools:src="@mipmap/ic_launcher"
|
||||||
android:contentDescription="@string/cover_of_image"
|
android:contentDescription="@string/cover_of_image"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintVertical_bias="0.0"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintBottom_toTopOf="@id/button_container"/>
|
||||||
app:layout_constraintBottom_toTopOf="@id/button_container" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/button_container"
|
android:id="@+id/button_container"
|
||||||
@ -46,7 +45,7 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent">
|
app:layout_constraintBottom_toBottomOf="parent">
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_save"
|
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_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
@ -57,7 +56,7 @@
|
|||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_share"
|
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"
|
app:layout_constraintStart_toEndOf="@id/btn_save"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -254,6 +254,10 @@
|
|||||||
<item name="android:textSize">12sp</item>
|
<item name="android:textSize">12sp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Widget.Tachiyomi.Button.ActionButton.White.Landscape">
|
||||||
|
<item name="iconGravity">start</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<style name="Widget.Tachiyomi.Button.ActionButton.White">
|
<style name="Widget.Tachiyomi.Button.ActionButton.White">
|
||||||
<item name="iconTint">@color/md_white_1000</item>
|
<item name="iconTint">@color/md_white_1000</item>
|
||||||
<item name="android:textColor">@color/md_white_1000</item>
|
<item name="android:textColor">@color/md_white_1000</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user