918502742d
* Implemented language badge on library items * Added left margin for better viewing the badge on list view * Adjusting borders on badges, cleaning string interpolation and cleaning code * Improving readability on Holders and removing unused background and text on grid items
170 lines
6.9 KiB
XML
170 lines
6.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
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">
|
|
|
|
<FrameLayout
|
|
android:id="@+id/card"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="220dp"
|
|
android:background="@drawable/rounded_rectangle">
|
|
|
|
<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" />
|
|
|
|
<View
|
|
android:id="@+id/gradient"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="bottom"
|
|
android:background="@drawable/gradient_shape" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/badges"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="4dp"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginEnd="4dp">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/left_badges"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/rounded_rectangle">
|
|
|
|
<TextView
|
|
android:id="@+id/local_text"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/colorTertiary"
|
|
android:paddingStart="3dp"
|
|
android:paddingTop="1dp"
|
|
android:paddingEnd="3dp"
|
|
android:paddingBottom="1dp"
|
|
android:maxLines="1"
|
|
android:text="@string/local_source_badge"
|
|
android:textAppearance="?attr/textAppearanceCaption"
|
|
android:textColor="?attr/colorOnTertiary"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
|
|
<TextView
|
|
android:id="@+id/download_text"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/colorTertiary"
|
|
android:paddingStart="3dp"
|
|
android:paddingTop="1dp"
|
|
android:maxLines="1"
|
|
android:paddingEnd="3dp"
|
|
android:paddingBottom="1dp"
|
|
android:textAppearance="?attr/textAppearanceCaption"
|
|
android:textColor="?attr/colorOnTertiary"
|
|
android:visibility="gone"
|
|
tools:text="120"
|
|
tools:visibility="visible" />
|
|
|
|
<TextView
|
|
android:id="@+id/unread_text"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/colorSecondary"
|
|
android:paddingStart="3dp"
|
|
android:paddingTop="1dp"
|
|
android:paddingEnd="3dp"
|
|
android:paddingBottom="1dp"
|
|
android:maxLines="1"
|
|
android:textAppearance="?attr/textAppearanceCaption"
|
|
android:textColor="?attr/colorOnSecondary"
|
|
android:visibility="gone"
|
|
tools:text="120"
|
|
tools:visibility="visible" />
|
|
|
|
<TextView
|
|
android:id="@+id/favorite_text"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/colorSecondary"
|
|
android:maxLines="1"
|
|
android:paddingStart="3dp"
|
|
android:paddingTop="1dp"
|
|
android:paddingEnd="3dp"
|
|
android:paddingBottom="1dp"
|
|
android:text="@string/in_library"
|
|
android:textAppearance="?attr/textAppearanceCaption"
|
|
android:textColor="?attr/colorOnSecondary"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
</LinearLayout>
|
|
|
|
<View
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1" />
|
|
|
|
<LinearLayout
|
|
android:id="@+id/right_badges"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="@drawable/rounded_rectangle">
|
|
|
|
<TextView
|
|
android:id="@+id/language_text"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:background="?attr/colorTertiary"
|
|
android:maxLines="1"
|
|
android:paddingStart="3dp"
|
|
android:paddingTop="1dp"
|
|
android:paddingEnd="3dp"
|
|
android:paddingBottom="1dp"
|
|
tools:text="EN"
|
|
android:textAppearance="?attr/textAppearanceCaption"
|
|
android:textColor="?attr/colorOnTertiary"
|
|
android:visibility="gone"
|
|
tools:visibility="visible" />
|
|
</LinearLayout>
|
|
</LinearLayout>
|
|
|
|
<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/textAppearanceSubtitle2"
|
|
android:textSize="12sp"
|
|
android:textColor="@color/md_white_1000"
|
|
tools:text="Sample name" />
|
|
|
|
<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>
|
|
|
|
</FrameLayout>
|