Sometime we need a professional look our application. corner Radius is the best part of best look of any view of apps.

Code

android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();
gd.setColor(Color.parseColor(_color));
gd.setCornerRadius((int)_value);
_view.setBackground(gd);

This block code is used to set redius corner of any view(textview,editext,linear, button etc.)

To use this code replace _color to hex color code. and replace _value to int value (1 to 360). paste this code on oncreate section.