Convert int value to Alpha String - Android Graphics

Android examples for Graphics:Color

Description

Convert int value to Alpha String

Demo Code


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

public class Main {
    public static String toAlphaString(int bgColor) {
        return "" + (Color.alpha(bgColor) / 255f);
    }/*ww w . j  a  v a2 s .  co m*/
}

Related Tutorials