diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchCardHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchCardHolder.kt
index 7cf6da853d..1736b3de05 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchCardHolder.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchCardHolder.kt
@@ -5,6 +5,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy
import eu.kanade.tachiyomi.data.database.models.Manga
import eu.kanade.tachiyomi.data.glide.GlideApp
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
+import eu.kanade.tachiyomi.util.view.visibleIf
import eu.kanade.tachiyomi.widget.StateImageViewTarget
import kotlinx.android.synthetic.main.source_global_search_controller_card_item.*
@@ -29,10 +30,8 @@ class SourceSearchCardHolder(view: View, adapter: SourceSearchCardAdapter) :
}
fun bind(manga: Manga) {
- tvTitle.text = manga.title
- // Set alpha of thumbnail.
- itemImage.alpha = if (manga.favorite) 0.3f else 1.0f
-
+ title.text = manga.title
+ favorite_button.visibleIf(manga.favorite)
setImage(manga)
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchHolder.kt
index ca8c4b1e8c..018a3c88fc 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchHolder.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchHolder.kt
@@ -52,7 +52,8 @@ class SourceSearchHolder(view: View, val adapter: SourceSearchAdapter) :
}
results.isEmpty() -> {
progress.gone()
- hideHolder()
+ no_results.visible()
+ source_card.gone()
}
else -> {
progress.gone()
@@ -92,12 +93,7 @@ class SourceSearchHolder(view: View, val adapter: SourceSearchAdapter) :
}
private fun showHolder() {
- title.visible()
source_card.visible()
- }
-
- private fun hideHolder() {
- title.gone()
- source_card.gone()
+ no_results.gone()
}
}
diff --git a/app/src/main/res/drawable/favorite_badge_rounded.xml b/app/src/main/res/drawable/favorite_badge_rounded.xml
new file mode 100644
index 0000000000..2dab341954
--- /dev/null
+++ b/app/src/main/res/drawable/favorite_badge_rounded.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/source_global_search_controller_card.xml b/app/src/main/res/layout/source_global_search_controller_card.xml
index b7ac54c74c..322723251e 100644
--- a/app/src/main/res/layout/source_global_search_controller_card.xml
+++ b/app/src/main/res/layout/source_global_search_controller_card.xml
@@ -11,19 +11,40 @@
style="@style/TextAppearance.Regular.SubHeading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="@dimen/material_component_text_fields_padding_above_and_below_label"
- app:layout_constraintBottom_toTopOf="@+id/source_card"
- app:layout_constraintHeight_default="wrap"
+ android:paddingTop="16dp"
+ android:paddingStart="16dp"
+ android:paddingEnd="0dp"
+ android:paddingBottom="0dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Title" />
-
+
+
-
+
diff --git a/app/src/main/res/layout/source_global_search_controller_card_item.xml b/app/src/main/res/layout/source_global_search_controller_card_item.xml
index 61375e95f5..eca8d6e553 100644
--- a/app/src/main/res/layout/source_global_search_controller_card_item.xml
+++ b/app/src/main/res/layout/source_global_search_controller_card_item.xml
@@ -1,55 +1,87 @@
-
+ android:background="@drawable/library_item_selector">
-
-
-
+ app:layout_constraintVertical_bias="1.0">
-
+
+
+
+
+
+
+
+
+
+
+
+
+ app:layout_constraintTop_toBottomOf="@+id/card"
+ tools:text="Sample name" />