Sunday, July 31, 2011

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

On 07/31/2011 03:40 PM, Marcin Orlowski wrote:
> On 31 July 2011 15:13, Olivier Guilyardi <
> <>> wrote:
> How comes Resources.getColor() returns an int? This can't hold the
> maximum value
> of 0xFFFFFFFF because Java int is signed.
> Java does not offer "unsigned" so you're right, you will get negative
> value if you i.e. Log.i(() it, but that's not really important as it's
> just matter of *interpretation* of the value. All bits of 0xFFFFFFFF are
> the same no matter if you *treat* it as signed or unsigned int and this
> is what matters.

Ok, thanks, let's call that a subtlety then.


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