convert Color To Drawable - Android Graphics

Android examples for Graphics:Color

Description

convert Color To Drawable

Demo Code


import android.databinding.BindingConversion;
import android.graphics.drawable.ColorDrawable;

public class Main{
    @BindingConversion/*w  w w  . ja va  2  s . c om*/
    public static ColorDrawable convertColorToDrawable(int color) {
        return new ColorDrawable(color);
    }
}

Related Tutorials