@@ -229,10 +229,11 @@ private void setShapeBackground() {
229
229
drawableNormal .setColor (backgroundColor );
230
230
drawablePressed .setColor (backgroundPressed );
231
231
drawableDisabled .setColor (backgroundDisabled );
232
- drawableNormal .setStroke ((int ) frameSize , frameColor );
233
- drawablePressed .setStroke ((int ) frameSize , frameColorPressed );
234
- drawableDisabled .setStroke ((int ) frameSize , frameColorDisabled );
235
-
232
+ if (frameSize > 0 ) {
233
+ drawableNormal .setStroke ((int ) frameSize , frameColor );
234
+ drawablePressed .setStroke ((int ) frameSize , frameColorPressed );
235
+ drawableDisabled .setStroke ((int ) frameSize , frameColorDisabled );
236
+ }
236
237
237
238
if (Build .VERSION .SDK_INT < Build .VERSION_CODES .LOLLIPOP ) {
238
239
@@ -246,7 +247,6 @@ private void setShapeBackground() {
246
247
container .setBackgroundDrawable (stateListDrawable );
247
248
248
249
} else {
249
-
250
250
stateListDrawable .addState (new int []{android .R .attr .state_enabled }, drawableNormal );
251
251
stateListDrawable .addState (new int []{}, drawableDisabled );
252
252
@@ -332,11 +332,6 @@ public void setFrame(int color, float size) {
332
332
setShapeBackground ();
333
333
}
334
334
335
- public void removeFrame () {
336
- frameSize = 0 ;
337
- setShapeBackground ();
338
- }
339
-
340
335
/**
341
336
* Set frame size and color from color state list.
342
337
* Only three states are use: disabled, pressed, normal.
@@ -363,6 +358,11 @@ public void setFrameSize(float frameSize) {
363
358
setShapeBackground ();
364
359
}
365
360
361
+ public void removeFrame () {
362
+ frameSize = 0 ;
363
+ setShapeBackground ();
364
+ }
365
+
366
366
/**
367
367
* Set text color.
368
368
*
0 commit comments