debug: trying to resolve Canvas: trying to use a recycled bitmap
.
This commit is contained in:
parent
966a082147
commit
db75c5b74a
@ -67,18 +67,22 @@ class FilterSheetFragment : BottomSheetDialogFragment(), DIAware {
|
|||||||
val c = Chip(context)
|
val c = Chip(context)
|
||||||
c.text = tag.tag
|
c.text = tag.tag
|
||||||
|
|
||||||
val gd = GradientDrawable()
|
try {
|
||||||
val gdColor = try {
|
val gd = GradientDrawable()
|
||||||
Color.parseColor(tag.color)
|
val gdColor = try {
|
||||||
} catch (e: IllegalArgumentException) {
|
Color.parseColor(tag.color)
|
||||||
e.sendSilentlyWithAcraWithName("color issue " + tag.color)
|
} catch (e: IllegalArgumentException) {
|
||||||
resources.getColor(R.color.colorPrimary)
|
e.sendSilentlyWithAcraWithName("color issue " + tag.color)
|
||||||
|
resources.getColor(R.color.colorPrimary)
|
||||||
|
}
|
||||||
|
gd.setColor(gdColor)
|
||||||
|
gd.shape = GradientDrawable.RECTANGLE
|
||||||
|
gd.setSize(30, 30)
|
||||||
|
gd.cornerRadius = 30F
|
||||||
|
c.chipIcon = gd
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.sendSilentlyWithAcraWithName("tags > GradientDrawable")
|
||||||
}
|
}
|
||||||
gd.setColor(gdColor)
|
|
||||||
gd.shape = GradientDrawable.RECTANGLE
|
|
||||||
gd.setSize(30, 30)
|
|
||||||
gd.cornerRadius = 30F
|
|
||||||
c.chipIcon = gd
|
|
||||||
|
|
||||||
c.setOnCloseIconClickListener {
|
c.setOnCloseIconClickListener {
|
||||||
(it as Chip).isCloseIconVisible = false
|
(it as Chip).isCloseIconVisible = false
|
||||||
@ -127,7 +131,11 @@ class FilterSheetFragment : BottomSheetDialogFragment(), DIAware {
|
|||||||
dataSource: DataSource?,
|
dataSource: DataSource?,
|
||||||
isFirstResource: Boolean
|
isFirstResource: Boolean
|
||||||
): Boolean {
|
): Boolean {
|
||||||
c.chipIcon = resource
|
try {
|
||||||
|
c.chipIcon = resource
|
||||||
|
} catch (e: Exception) {
|
||||||
|
e.sendSilentlyWithAcraWithName("sources > onResourceReady")
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}).preload()
|
}).preload()
|
||||||
|
Loading…
Reference in New Issue
Block a user