add Alpha To Color - Android Graphics

Android examples for Graphics:Color Alpha

Description

add Alpha To Color

Demo Code


//package com.java2s;

import android.graphics.Color;

public class Main {
    public static int addAlphaToColor(int alpha, int color) {
        return Color.argb(alpha, Color.red(color), Color.green(color),
                Color.blue(color));
    }/*from w w w.  ja va  2  s .co  m*/
}

Related Tutorials