Android Question GradientDrawable to a Label from code

vecchiounno

Member
Licensed User
how can I assign GradientDrawable to a Label from code?

Dim gd As GradientDrawable
Dim clr(2) As Int
clr(0)=Colors.Blue
clr(1)=Colors.Yellow
gd.Initialize("TOP_BOTTOM",clr)
gd.CornerRadius=50dip
Label1.Color=gd

Error:
java.lang.NumberFormatException: For input string: "(GradientDrawable) android.graphics.drawable.GradientDrawable@c4e49ff"

tks
 
Top