I am very new to Android and try a simple log to get a random background color. I have a code and it returns an integer from 1 to 256, or so I think. I need to register a value to check if everything is ok, but I'm not sure how to register it using Android. I used System.out.println("stuff") to register stuff in the past, but I believe that it is not the way you expect it to be in Android.
I have a class:
public static int backgroundColorRandomize()
which returns
return randomRGB;
and I'm trying to write it like this:
Log.d(backgroundColorRandomize(), "value = " + randomRGB);
but I need to convert the return value from backgroundColorRandomize to String so that it can be logged.
I tried java .toString , but I'm not sure that I am using it correctly .. Any help would be appreciated! Thanks!
source share