Sunday, July 31, 2011

Re: [android-developers] Resources.getColor() return type is too small

On Sun, Jul 31, 2011 at 9:13 AM, Olivier Guilyardi <> wrote:
> How comes Resources.getColor() returns an int? This can't hold the maximum value
> of 0xFFFFFFFF because Java int is signed.

An int can hold 0xFFFFFFFF, because an int is 32 bits, and 0xFFFFFFFF
is a 32-bit value. From a mathematics perspective, 0xFFFFFFFF is a
negative number in Java.

Mark Murphy (a Commons Guy) | |

Warescription: Three Android Books, Plus Updates, One Low Price!

You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment