mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 04:21:52 +01:00
Tweak manga info header backdrop
This commit is contained in:
parent
2e8791a101
commit
cef1c4b8a1
@ -311,12 +311,16 @@ class MangaInfoHeaderAdapter(
|
|||||||
|
|
||||||
// backgroundTint attribute doesn't work properly on Android 5
|
// backgroundTint attribute doesn't work properly on Android 5
|
||||||
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) {
|
||||||
binding.mangaInfoToggleMoreScrim.background.setColorFilter(
|
listOf(binding.backdropOverlay, binding.mangaInfoToggleMoreScrim)
|
||||||
|
.forEach {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
it.background.setColorFilter(
|
||||||
view.context.getResourceColor(android.R.attr.colorBackground),
|
view.context.getResourceColor(android.R.attr.colorBackground),
|
||||||
PorterDuff.Mode.SRC_ATOP
|
PorterDuff.Mode.SRC_ATOP
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun showMangaInfo(visible: Boolean) {
|
private fun showMangaInfo(visible: Boolean) {
|
||||||
binding.mangaSummarySection.isVisible = visible
|
binding.mangaSummarySection.isVisible = visible
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<gradient
|
<gradient
|
||||||
android:angle="90"
|
android:angle="90"
|
||||||
android:startColor="?android:attr/colorBackground"
|
android:startColor="#ffffffff"
|
||||||
android:endColor="#00ffffff"/>
|
android:endColor="#00ffffff"/>
|
||||||
|
|
||||||
<corners android:radius="0dp" />
|
<corners android:radius="0dp" />
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
android:id="@+id/backdrop"
|
android:id="@+id/backdrop"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginBottom="?attr/actionBarSize"
|
android:layout_marginBottom="44dp"
|
||||||
android:alpha="0.2"
|
android:alpha="0.2"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@ -24,10 +24,12 @@
|
|||||||
tools:background="@mipmap/ic_launcher" />
|
tools:background="@mipmap/ic_launcher" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/backdrop_overlay"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="88dp"
|
android:layout_height="160dp"
|
||||||
android:layout_marginBottom="?attr/actionBarSize"
|
android:layout_marginBottom="44dp"
|
||||||
android:background="@drawable/manga_info_gradient"
|
android:background="@drawable/manga_info_gradient"
|
||||||
|
android:backgroundTint="?android:attr/colorBackground"
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
app:layout_constraintBottom_toBottomOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
@ -36,7 +38,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:paddingStart="16dp"
|
android:paddingStart="16dp"
|
||||||
android:paddingTop="64dp"
|
android:paddingTop="48dp"
|
||||||
android:paddingEnd="16dp"
|
android:paddingEnd="16dp"
|
||||||
android:paddingBottom="8dp"
|
android:paddingBottom="8dp"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
@ -129,24 +131,17 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:paddingStart="16dp"
|
|
||||||
android:paddingEnd="16dp">
|
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_favorite"
|
android:id="@+id/btn_favorite"
|
||||||
style="@style/Theme.Widget.Button.Action"
|
style="@style/Theme.Widget.Button.Action"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
android:text="@string/add_to_library"
|
android:text="@string/add_to_library"
|
||||||
app:icon="@drawable/ic_favorite_border_24dp"
|
app:icon="@drawable/ic_favorite_border_24dp"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/btn_tracking"
|
app:layout_constraintEnd_toStartOf="@+id/btn_tracking"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toBottomOf="@+id/manga_info" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_tracking"
|
android:id="@+id/btn_tracking"
|
||||||
@ -158,7 +153,7 @@
|
|||||||
app:icon="@drawable/ic_sync_24dp"
|
app:icon="@drawable/ic_sync_24dp"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/btn_webview"
|
app:layout_constraintEnd_toStartOf="@+id/btn_webview"
|
||||||
app:layout_constraintStart_toEndOf="@+id/btn_favorite"
|
app:layout_constraintStart_toEndOf="@+id/btn_favorite"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/manga_info"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
@ -166,12 +161,13 @@
|
|||||||
style="@style/Theme.Widget.Button.Action"
|
style="@style/Theme.Widget.Button.Action"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:text="@string/action_web_view"
|
android:text="@string/action_web_view"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:icon="@drawable/ic_public_24dp"
|
app:icon="@drawable/ic_public_24dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toEndOf="@+id/btn_tracking"
|
app:layout_constraintStart_toEndOf="@+id/btn_tracking"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/manga_info"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
Loading…
Reference in New Issue
Block a user