in einem Separaten Projekt funktioniert es, aber bei mir im Projekt bekomme ich den Fehler :
B4X:
Parsing code. 0.06
Compiling code. Error
Error compiling program.
Error description: Process object is expected. {Type=GradientDrawable,Rank=0} is an Activity object.
Declaring the variable in Sub Globals instead of Sub Process_Globals will solve this problem.
Occurred on line: 49
AB.SetBackground(gd)
Word: gd
B4X:
Dim gd As GradientDrawable, col(2) As Int
col(0) = Colors.RGB(47, 68, 80)
col(1) = Colors.RGB(47, 68, 80)
gd.Initialize("TOP_BOTTOM", col)
gd.CornerRadius = 0dip
AB.SetBackground(gd)