Skip to content

Commit 704a75b

Browse files
committed
Merge pull request castorflex#1 from 5im0n/master
Add isFlipping function()
2 parents 4e363c4 + 02c7edb commit 704a75b

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)