You need to use the DrawDrawable function and pass it a GradientDrawable object.
B4X:
Dim GD As GradientDrawable
Dim Colours(2) As Int
Colours(0) = Colors.Black
Colours(1) = Colors.White
GD.Initialize("TOP_BOTTOM",Colours)
Canvas1.DrawDrawable(GD,Rect1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.