Check out example codes for "and roid shape setCornerRadii". It will help you in understanding the concepts better.

Code Example 1

float mRadius=3f;

    GradientDrawable drawable=new GradientDrawable();
    drawable.setShape(GradientDrawable.RECTANGLE);
    drawable.setCornerRadii(new float[]{mRadius, mRadius, 0, 0, 0, 0, mRadius, mRadius});

Learn ReactJs, React Native from akashmittal.com