0

I have created a button with a Gradient Drawable.

enter image description here

If you look at this button, it has those Extra Grey lines as pointed out by my red arrows. Those don't appear if I create a shape using XML but when i use

Gradient Drawable code seen below it shows these lines. How do I get rid of them??

    GradientDrawable gd = new GradientDrawable();
    gd.setColor(Color.parseColor("#FFFFFFFF")); 
    gd.setCornerRadius(20);
    gd.setStroke(30, Color.parseColor("#0077CC"));
    Button.setBackground(gd);

These become more apparent if i increase the setCorner Radius

Mysterious_android
  • 598
  • 2
  • 9
  • 32

1 Answers1

1

Just add style to your button.

style="?android:attr/borderlessButtonStyle"

K.Sopheak
  • 22,904
  • 4
  • 33
  • 78