Cover only grid added to library (#6528)

* No title grid added to library and source

* Else added to display title in case image is null or empty

* No title grid renamed and now only available in library

* Spanish strings about cover only grid removed

Co-authored-by: micaelagimenez <micaela.gimenez@ext.prosegur.com>
This commit is contained in:
Mica
2022-02-12 15:03:22 -03:00
committed by arkon
parent 790d7b9170
commit 44b055c019
8 changed files with 171 additions and 24 deletions

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="2dp"
android:background="@drawable/library_item_selector"
android:foreground="@drawable/library_item_selector_overlay"
android:padding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/card"
android:layout_width="match_parent"
android:layout_height="220dp"
android:background="@drawable/rounded_rectangle"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:scaleType="centerCrop"
tools:ignore="ContentDescription"
tools:src="@mipmap/ic_launcher" />
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:ellipsize="end"
android:maxLines="2"
android:padding="8dp"
android:shadowColor="@color/md_black_1000"
android:shadowDx="0"
android:shadowDy="0"
android:shadowRadius="4"
android:textAppearance="?attr/textAppearanceTitleSmall"
android:textSize="12sp"
android:textColor="@color/md_white_1000"
tools:text="Sample name" />
<include
android:id="@+id/badges"
layout="@layout/source_grid_item_badges" />
<com.google.android.material.progressindicator.CircularProgressIndicator
android:id="@+id/progress"
style="@style/Widget.Tachiyomi.CircularProgressIndicator.Small"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:indeterminate="true"
android:visibility="gone" />
</FrameLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>

View File

@@ -91,6 +91,7 @@
<string name="action_display_grid">Compact grid</string>
<string name="action_display_comfortable_grid">Comfortable grid</string>
<string name="action_display_list">List</string>
<string name="action_display_cover_only_grid">Cover only grid</string>
<string name="action_display_download_badge">Downloaded chapters</string>
<string name="action_display_unread_badge">Unread chapters</string>
<string name="action_display_local_badge">Local manga</string>