Android Question read panel color

tufanv

Expert
Licensed User
Longtime User
Hello

in b4i i can use :
B4X:
If paneldoviz(i-1).Color = Colors.RGB(64,64,64) Then

to read the backgroudn color of a panel and do things according to it. but in b4a it says it is writeonly.

I found an old post about it and it says we have to initialize canvas to the panel to use canvas.bitmap.gitpixel

But when i use :
cv(i).Initialize(pdoviz(i))

i get : java.lang.NullPointerException

for the initialize. How can i solve this and read panels background color ?

TY
 
Top