Removed the dependency com.amulyakhare.textdrawable and slightly simplified the logic required to set circular images.
## Types of changes
- [x] I have read the **CONTRIBUTING** document.
- [x] My code follows the code style of this project.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.
- [x] This is **NOT** translation related.
This closes issue #120
Removed the dependency `com.amulyakhare.textdrawable` and slightly simplified the logic required to set circular images.
You could call `setBackgroundAndText` with a single parameter, and call `toTextDrawableString` inside.
Also, here, there is an issue, it should be `itm.sourcetitle` that should be used.
```
binding.sourceImage.setBackgroundAndText(itm.sourcetitle.getHtmlDecoded())
```
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Types of changes
This closes issue #120
Removed the dependency
com.amulyakhare.textdrawableand 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
setBackgroundAndTextwith a single parameter, and calltoTextDrawableStringinside.Also, here, there is an issue, it should be
itm.sourcetitlethat 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: ShapeableImageViewval textView: TextViewprivate 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.
ea6261c975to10ab67d071Alright, this should do.