Can't set stroke width programatically
Closed this issue · 2 comments
nburaktaban commented
I'm using Kotlin DSL. Here's my code
inline fun ViewGroup.gauge(theme: Int = 0, init: CustomGauge.() -> Unit) = ankoView( { CustomGauge(it) }, theme, init)
gauge {
padding = dip(15)
endValue = 500
pointEndColor = Color.parseColor("#63bc73")
pointStartColor = Color.parseColor("#63bc73")
startAngle = 270
startValue = 100
strokeCap = "ROUND"
strokeColor = Color.parseColor("#aba3a3")
strokeWidth = 15f
sweepAngle = 360
}.lparams(width = dip(250), height = dip(250)) {
centerHorizontally()
}
Here is what I get. Even when I play with strokeWidth
it doesn't effect. Any suggestions? Am I missing somethings?
pkleczko commented
Did you manage to resolve your problem? Was is sth wrong with setting stroke width or just problem with your implementation?
nburaktaban commented
No, I did not. I ended up using XML layout instead of Kotlin DSL.