drawable.setcornerradii code example
Example: and roid shape setCornerRadii
float mRadius=3f;
GradientDrawable drawable=new GradientDrawable();
drawable.setShape(GradientDrawable.RECTANGLE);
drawable.setCornerRadii(new float[]{mRadius, mRadius, 0, 0, 0, 0, mRadius, mRadius});