Hex transparency in colors [duplicate]

This question already has answers here: Understanding colors on Android (six characters) (10 answers) Closed 5 years ago. I’m working on implementing a widget transparency option for my app widget although I’m having some trouble getting the hex color values right. Being completely new to hex color transparency I searched around a bit although I … Read more

How to convert a byte array to a hex string in Java?

From the discussion here, and especially this answer, this is the function I currently use: private static final char[] HEX_ARRAY = “0123456789ABCDEF”.toCharArray(); public static String bytesToHex(byte[] bytes) { char[] hexChars = new char[bytes.length * 2]; for (int j = 0; j < bytes.length; j++) { int v = bytes[j] & 0xFF; hexChars[j * 2] = … Read more