mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Update Global search layout to match Library and Browse (#3892)
* Update Global Search card item to be comfortable with rounded corners * Remove card background
This commit is contained in:
		| @@ -7,6 +7,7 @@ import eu.kanade.tachiyomi.data.glide.GlideApp | ||||
| import eu.kanade.tachiyomi.data.glide.toMangaThumbnail | ||||
| import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder | ||||
| import eu.kanade.tachiyomi.widget.StateImageViewTarget | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card_item.card | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card_item.itemImage | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card_item.progress | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card_item.tvTitle | ||||
| @@ -32,6 +33,8 @@ class GlobalSearchCardHolder(view: View, adapter: GlobalSearchCardAdapter) : | ||||
|     } | ||||
|  | ||||
|     fun bind(manga: Manga) { | ||||
|         card.clipToOutline = true | ||||
|  | ||||
|         tvTitle.text = manga.title | ||||
|         // Set alpha of thumbnail. | ||||
|         itemImage.alpha = if (manga.favorite) 0.3f else 1.0f | ||||
|   | ||||
| @@ -8,7 +8,6 @@ import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.no_results_found | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.progress | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.recycler | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.source_card | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.title | ||||
| import kotlinx.android.synthetic.main.global_search_controller_card.title_wrapper | ||||
|  | ||||
| @@ -103,11 +102,9 @@ class GlobalSearchHolder(view: View, val adapter: GlobalSearchAdapter) : | ||||
|  | ||||
|     private fun showResultsHolder() { | ||||
|         no_results_found.isVisible = false | ||||
|         source_card.isVisible = true | ||||
|     } | ||||
|  | ||||
|     private fun showNoResults() { | ||||
|         no_results_found.isVisible = true | ||||
|         source_card.isVisible = false | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user