set Color Alpha - Android Graphics

Android examples for Graphics:Color Alpha

Description

set Color Alpha

Demo Code


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

public class Main {
    public static int setAlpha(int color, int alpha) {

        int red = Color.red(color);
        int blue = Color.blue(color);
        int green = Color.green(color);

        return Color.argb(alpha, red, green, blue);
    }/*from  www .  ja va 2  s.  c  o m*/
}

Related Tutorials