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
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…