textDrawable #136
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "davidoskky/ReaderForSelfoss-multiplatform:textDrawable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Types of changes
This closes issue #120
Removed the dependency
com.amulyakhare.textdrawable
and slightly simplified the logic required to set circular images.Just a little cleaning, and this can be merged.
@ -91,3 +83,1 @@
.round()
.build(itm.title.getHtmlDecoded().toTextDrawableString(), color)
binding.sourceImage.setImageDrawable(drawable)
binding.sourceImage.setBackgroundAndText(itm.title.getHtmlDecoded(), itm.title.getHtmlDecoded().toTextDrawableString())
You could call
setBackgroundAndText
with a single parameter, and calltoTextDrawableString
inside.Also, here, there is an issue, it should be
itm.sourcetitle
that should be used.@ -65,3 +55,1 @@
.build(itm.title.getHtmlDecoded().toTextDrawableString(), color)
binding.itemImage.setImageDrawable(drawable)
binding.itemImage.setBackgroundAndText(itm.title.getHtmlDecoded(), itm.title.getHtmlDecoded().toTextDrawableString())
Same as before:
@ -0,0 +20,4 @@
val imageView: ShapeableImageView
val textView: TextView
private val colorScheme = listOf(
Why introduce a new way to handle colors, instead of using the color generator that was used previously ?
The color generator was provided by the library we're removing. I simply copied the relevant part of the code from there.
ea6261c975
to10ab67d071
Alright, this should do.