Android examples for Graphics:Color Alpha
set New color Alpha between 0 and 255
//package com.java2s; public class Main { public static int setNewAlpha0to255(int color, float alpha) { return setAlpha0to1(color, alpha / 255); }//from w w w. j ava2 s. c om public static int setAlpha0to1(int color, float alpha) { return color & 0x00FFFFFF | Math.round(0xFF * alpha) << 24; } }