Skip to content
This repository was archived by the owner on Mar 27, 2022. It is now read-only.

Commit 9d4f654

Browse files
committed
Gradle update and scaling but no animation issue fixed.
1 parent ada2482 commit 9d4f654

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.3'
8+
classpath 'com.android.tools.build:gradle:2.3.0'
99
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1010

1111
// NOTE: Do not place your application dependencies here; they belong
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Aug 19 17:41:56 EEST 2016
1+
#Fri Mar 03 09:20:49 EET 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

library/src/main/java/co/ceryle/radiorealbutton/library/RadioRealButtonGroup.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,11 @@ private void setBottomLineAttrs() {
156156
}
157157

158158
private void setSelectorAttrs() {
159-
View selectorView = selectorContainer;
160-
161-
FrameLayout.LayoutParams selectorParams = (FrameLayout.LayoutParams) selectorView.getLayoutParams();
159+
FrameLayout.LayoutParams selectorParams = (FrameLayout.LayoutParams) selectorContainer.getLayoutParams();
162160
FrameLayout.LayoutParams bottomLineParams = (FrameLayout.LayoutParams) v_bottomLine.getLayoutParams();
163161

164162
if (selectorBringToFront)
165-
selectorView.bringToFront();
163+
selectorContainer.bringToFront();
166164

167165
selectorParams.height = selectorSize;
168166

@@ -237,9 +235,9 @@ private void setBorderAttrs() {
237235

238236
private float radius, animateImagesScale, animateTextsScale;
239237

240-
private boolean bottomLineBringToFront, selectorBringToFront, selectorAboveOfBottomLine, selectorTop, selectorBottom,
241-
hasPadding, hasPaddingLeft, hasPaddingRight, hasPaddingTop, hasPaddingBottom, hasDividerBackgroundColor, clickable,
242-
enabled, enableDeselection, hasEnabled, hasClickable, hasBorder, hasAnimateImages, hasAnimateTexts, hasAnimation;
238+
private boolean bottomLineBringToFront, selectorBringToFront, selectorAboveOfBottomLine, selectorTop, selectorBottom, hasPadding,
239+
hasPaddingLeft, hasPaddingRight, hasPaddingTop, hasPaddingBottom, hasDividerBackgroundColor, clickable, enabled,
240+
enableDeselection, hasEnabled, hasClickable, hasBorder, hasAnimateImages, hasAnimateTexts, hasAnimation;
243241

244242
private void getAttributes(AttributeSet attrs) {
245243
TypedArray ta = getContext().obtainStyledAttributes(attrs, R.styleable.RadioRealButtonGroup);
@@ -359,8 +357,11 @@ else if (checkedButtonId == NO_ID && button.isChecked())
359357

360358
if (lastPosition == position) {
361359
button.setChecked(true);
362-
button.bounceDrawable(animateImagesScale + 1);
363-
button.bounceText(animateTextsScale + 1);
360+
361+
if (hasAnimateImages)
362+
button.bounceDrawable(animateImagesScale + 1);
363+
if (hasAnimateTexts)
364+
button.bounceText(animateTextsScale + 1);
364365
} else
365366
button.setChecked(false);
366367

0 commit comments

Comments
 (0)