set Alpha for a color - Android Graphics

Android examples for Graphics:Color Alpha

Description

set Alpha for a color

Demo Code


//package com.java2s;
import android.graphics.Color;

public class Main {
    public static int setAlpha(int color, int value) {
        return Color.argb(value, Color.red(color), Color.green(color),
                Color.blue(color));
    }/*  www  . j  a v a  2s .c o m*/
}

Related Tutorials