diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-02-04 17:53:25 +0100 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-02-04 17:53:25 +0100 |
commit | f75d8258f4c31133a184b5ad09e2d71f4f7e3671 (patch) | |
tree | f533aa452d3766a7347a1c886e44141ab2df3546 /sparkbutton | |
parent | 7a11e156a555b8453791e45acd47e99c8153bf85 (diff) |
Fix button sizes not updated
Diffstat (limited to 'sparkbutton')
-rw-r--r-- | sparkbutton/src/main/java/com/varunest/sparkbutton/SparkButton.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sparkbutton/src/main/java/com/varunest/sparkbutton/SparkButton.java b/sparkbutton/src/main/java/com/varunest/sparkbutton/SparkButton.java index febfe0534..fd6b90d89 100644 --- a/sparkbutton/src/main/java/com/varunest/sparkbutton/SparkButton.java +++ b/sparkbutton/src/main/java/com/varunest/sparkbutton/SparkButton.java @@ -194,6 +194,11 @@ public class SparkButton extends FrameLayout implements View.OnClickListener { public void setImageSize(@Px int imageSize) { this.imageSize = imageSize; + if (imageView != null) { + imageView.getLayoutParams().width = imageSize; + imageView.getLayoutParams().height = imageSize; + imageView.requestLayout(); + } } public @ColorInt |