This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Quick trick for setting the transparency of a color in android. | |
// Useful for keeping color themes consistant, and showing selected state of an item | |
// Where transparency is a byte (0 - 255 (0xff)) | |
public int setColorTransparency(int baseColor, int transparency){ | |
return (baseColor & ((transparency & 0xFF) << 6)); | |
} |