1 |
torben |
1217 |
package dk.thoerup.side9.anim; |
2 |
|
|
|
3 |
|
|
import android.view.animation.Animation; |
4 |
|
|
import android.widget.ImageView; |
5 |
|
|
|
6 |
|
|
public final class DisplayNextView implements Animation.AnimationListener { |
7 |
|
|
private boolean mCurrentView; |
8 |
|
|
ImageView image1; |
9 |
|
|
ImageView image2; |
10 |
|
|
boolean forward; |
11 |
|
|
|
12 |
|
|
public DisplayNextView(boolean currentView, boolean forward, ImageView image1, ImageView image2) { |
13 |
|
|
mCurrentView = currentView; |
14 |
|
|
this.image1 = image1; |
15 |
|
|
this.image2 = image2; |
16 |
|
|
this.forward = forward; |
17 |
|
|
} |
18 |
|
|
|
19 |
|
|
public void onAnimationStart(Animation animation) { |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
public void onAnimationEnd(Animation animation) { |
23 |
|
|
image1.post(new SwapViews(mCurrentView, forward, image1, image2)); |
24 |
|
|
} |
25 |
|
|
|
26 |
|
|
public void onAnimationRepeat(Animation animation) { |
27 |
|
|
} |
28 |
|
|
} |