Code:android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable(); 
gd.setColor(Color.parseColor("#" + _color.replace("#", ""))); /* color */
gd.setCornerRadius((int)_radius); /* radius */
gd.setStroke(0, Color.WHITE); /* stroke heigth and color */
_view.setBackground(gd);