Widget - Set Radius

Anmol dwivedi
0


android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();
gd.setColor(Color.parseColor("#FFFFFF"));
gd.setCornerRadius(40);
linear1.setBackground(gd);

use with MoreBlock:

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

// _color your color string
// _numb Radious Number
// _view to view



Note:
gd.setCornerRadii(new float[] { 10, 10, 12, 12, 14, 14, 20, 20 }); //LeftTop, //RightTop, //RightBottom, //LeftBottom,

gd.setCornerRadius(40); //For All Radius

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.
Post a Comment (0)
Our website uses cookies to enhance your experience. Learn More
Accept !