Skip to content
This repository was archived by the owner on Oct 23, 2020. It is now read-only.

Commit 1a0555d

Browse files
committed
Merge pull request #72 from Clans/dev
Minor animation fix
2 parents ac393eb + d854722 commit 1a0555d

File tree

1 file changed

+6
-14
lines changed
  • library/src/main/java/com/github/clans/fab

1 file changed

+6
-14
lines changed

library/src/main/java/com/github/clans/fab/Label.java

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,26 +244,18 @@ void setColors(int colorNormal, int colorPressed, int colorRipple) {
244244
mColorRipple = colorRipple;
245245
}
246246

247-
boolean isHidden() {
248-
return getVisibility() == INVISIBLE;
249-
}
250-
251247
void show(boolean animate) {
252-
if (isHidden()) {
253-
if (animate) {
254-
playShowAnimation();
255-
}
256-
setVisibility(VISIBLE);
248+
if (animate) {
249+
playShowAnimation();
257250
}
251+
setVisibility(VISIBLE);
258252
}
259253

260254
void hide(boolean animate) {
261-
if (!isHidden()) {
262-
if (animate) {
263-
playHideAnimation();
264-
}
265-
setVisibility(INVISIBLE);
255+
if (animate) {
256+
playHideAnimation();
266257
}
258+
setVisibility(INVISIBLE);
267259
}
268260

269261
void setShowAnimation(Animation showAnimation) {

0 commit comments

Comments
 (0)