disable Color - Android Graphics

Android examples for Graphics:Color Darken

Description

disable Color

Demo Code


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

public class Main {
    public static int disableColor(int color) {
        int alpha = Color.alpha(color);
        int red = Color.red(color);
        int green = Color.green(color);
        int blue = Color.blue(color);

        return Color.argb((int) (alpha * 0.2f), red, green, blue);
    }/* w  w w . j a v a  2 s . c o  m*/
}

Related Tutorials