|
1 | 1 | package com.github.clans.fab; |
2 | 2 |
|
3 | | -import android.animation.LayoutTransition; |
4 | 3 | import android.annotation.TargetApi; |
5 | 4 | import android.content.Context; |
6 | 5 | import android.content.res.ColorStateList; |
|
32 | 31 | import android.view.View; |
33 | 32 | import android.view.ViewGroup; |
34 | 33 | import android.view.ViewOutlineProvider; |
35 | | -import android.view.ViewParent; |
36 | 34 | import android.view.animation.Animation; |
37 | 35 | import android.view.animation.AnimationUtils; |
38 | 36 | import android.widget.ImageButton; |
@@ -1300,8 +1298,16 @@ public void showButtonInMenu(boolean animate) { |
1300 | 1298 | * Set the label's background colors |
1301 | 1299 | */ |
1302 | 1300 | public void setLabelColors(int colorNormal, int colorPressed, int colorRipple) { |
1303 | | - getLabelView().setColors(colorNormal, colorPressed, colorRipple); |
1304 | | - getLabelView().updateBackground(); |
| 1301 | + Label label = getLabelView(); |
| 1302 | + |
| 1303 | + int left = label.getPaddingLeft(); |
| 1304 | + int top = label.getPaddingTop(); |
| 1305 | + int right = label.getPaddingRight(); |
| 1306 | + int bottom = label.getPaddingBottom(); |
| 1307 | + |
| 1308 | + label.setColors(colorNormal, colorPressed, colorRipple); |
| 1309 | + label.updateBackground(); |
| 1310 | + label.setPadding(left, top, right, bottom); |
1305 | 1311 | } |
1306 | 1312 |
|
1307 | 1313 | public void setLabelTextColor(int color) { |
|
0 commit comments