Skip to content

Commit 6129d9a

Browse files
committed
Add logic to magic support class
1 parent b018e84 commit 6129d9a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
package br.com.bloder.magic;
22

3+
import android.view.View;
4+
5+
import br.com.bloder.magic.internal.Back;
6+
import br.com.bloder.magic.internal.Go;
7+
38
/**
49
* Created by bloder on 28/07/16.
510
*/
611
public class Magic {
12+
13+
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+
}
23+
}
724
}

0 commit comments

Comments
 (0)