mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 10:37:51 +02:00
Lighter weight method of rounding cover art
This commit is contained in:
@ -34,6 +34,9 @@ class SourceItem(val manga: Manga, private val catalogueAsList: Preference<Boole
|
||||
val parent = adapter.recyclerView
|
||||
return if (parent is AutofitRecyclerView) {
|
||||
view.apply {
|
||||
// Setting this via XML doesn't work
|
||||
card.clipToOutline = true
|
||||
|
||||
card.layoutParams = FrameLayout.LayoutParams(
|
||||
MATCH_PARENT, parent.itemWidth / 3 * 4
|
||||
)
|
||||
|
@ -38,6 +38,9 @@ class LibraryItem(val manga: LibraryManga, private val libraryAsList: Preference
|
||||
val parent = adapter.recyclerView
|
||||
return if (parent is AutofitRecyclerView) {
|
||||
view.apply {
|
||||
// Setting this via XML doesn't work
|
||||
card.clipToOutline = true
|
||||
|
||||
val coverHeight = parent.itemWidth / 3 * 4
|
||||
card.layoutParams = FrameLayout.LayoutParams(MATCH_PARENT, coverHeight)
|
||||
gradient.layoutParams = FrameLayout.LayoutParams(
|
||||
|
@ -85,6 +85,9 @@ class MangaInfoController(private val fromSource: Boolean = false) :
|
||||
override fun onViewCreated(view: View) {
|
||||
super.onViewCreated(view)
|
||||
|
||||
// Setting this via XML doesn't work
|
||||
binding.mangaCover.clipToOutline = true
|
||||
|
||||
binding.btnFavorite.clicks()
|
||||
.onEach { onFavoriteClick() }
|
||||
.launchIn(scope)
|
||||
|
Reference in New Issue
Block a user