Android examples for Graphics:Gradient Color
create GradientDrawable from radius and color
//package com.java2s; import android.graphics.drawable.Drawable; import android.graphics.drawable.GradientDrawable; public class Main { public static Drawable createShape(int radius, int color) { GradientDrawable normalDrawable = new GradientDrawable(); normalDrawable.setCornerRadius(radius); normalDrawable.setColor(color);//from www . ja v a 2 s .c om return normalDrawable; } }