Android Get A Transparent Gradient Or Color

Use the 8-digit color value, e.g. , where the first two characters are the alpha value.

00 is full transparent and FF is fully opague.

start = Color.parseColor("#e2102e");
end = Color.parseColor("#fc1233");
GradientDrawable gd = new GradientDrawable(Orientation.TOP_BOTTOM, new int[] { start, end });
Posted in Android, Tips and Tricks Tagged with: , ,