Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa6395d

Browse files
committed
Clean magic class useless code
1 parent 274e85a commit aa6395d

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

.idea/vcs.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

magic/src/main/java/br/com/bloder/magic/Magic.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,16 @@
22

33
import android.view.View;
44

5-
import br.com.bloder.magic.internal.Back;
6-
import br.com.bloder.magic.internal.Go;
5+
import br.com.bloder.magic.internal.MagicAnimation;
76

87
/**
98
* Created by bloder on 28/07/16.
109
*/
1110
public class Magic {
1211

1312
public void doWith(View button) {
14-
if(button.getWidth() == button.getHeight()) {
15-
Go animator = new Go(button);
16-
animator.setDuration(200);
17-
button.startAnimation(animator);
18-
} else {
19-
Back animator = new Back(button);
20-
animator.setDuration(200);
21-
button.startAnimation(animator);
22-
}
13+
MagicAnimation animator = new MagicAnimation(button);
14+
animator.setDuration(200);
15+
button.startAnimation(animator);
2316
}
2417
}

0 commit comments

Comments
 (0)