Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.graphics.drawable.GradientDrawable;

public class Main {
    public static GradientDrawable getShape(float radius, int color) {
        GradientDrawable gd = new GradientDrawable();
        //        gd.setShape(GradientDrawable.OVAL); The larger the radius, the more round the radius
        gd.setCornerRadius(radius);
        gd.setColor(color);
        return gd;
    }
}