Skip to content

Commit 02c7edb

Browse files
author
Simon
committed
Add isFlipping() function to know if the FlipImageView is currently flipping.
1 parent 4e363c4 commit 02c7edb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/fr/castorflex/android/flipimageview/library/FlipImageView.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public interface OnFlipListener {
6868
private boolean mIsRotationYEnabled;
6969

7070
private boolean mIsRotationZEnabled;
71+
72+
private boolean mIsFlipping;
7173

7274
public FlipImageView(Context context) {
7375
super(context);
@@ -157,7 +159,9 @@ public void setDuration(int duration) {
157159
public boolean isFlipped() {
158160
return mIsFlipped;
159161
}
160-
162+
public boolean isFlipping() {
163+
return mIsFlipping;
164+
}
161165
public boolean isAnimated() {
162166
return mIsDefaultAnimated;
163167
}
@@ -209,13 +213,15 @@ public void onAnimationStart(Animation animation) {
209213
if (mListener != null) {
210214
mListener.onFlipStart();
211215
}
216+
mIsFlipping = true;
212217
}
213218

214219
@Override
215220
public void onAnimationEnd(Animation animation) {
216221
if (mListener != null) {
217222
mListener.onFlipEnd();
218223
}
224+
mIsFlipping = false;
219225
}
220226

221227
@Override

0 commit comments

Comments
 (0)