On 31 July 2011 15:13, Olivier Guilyardi <[email protected]> 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. PS: but if you want example of how to incorrectly cope with such case see android:versionCode - it's int and Market will complain if you set it to i.e. "201107311521", which is kinda lame. Regards, Marcin Orlowski *Tray Agenda <http://bit.ly/trayagenda>* - keep you daily schedule handy... *Date In Tray* <http://bit.ly/dateintraypro> - current date at glance... WebnetMobile on *Facebook <http://webnetmobile.com/fb/>* and *Twitter<http://webnetmobile.com/twitter/> * -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

