Java tutorial
//package com.java2s; import android.graphics.Paint; import android.graphics.SweepGradient; public class Main { protected static void setSweepGradientGradientPaint(Paint paint, float width, float height, int colorStart, int colorEnd) { paint.setShader(new SweepGradient(width, height, colorStart, colorEnd)); paint.setAntiAlias(true); } }