Do not show animation for image has no valid rect

This commit is contained in:
seven332 committed 2016-04-12 01:09:13 +08:00
1 parent 27bc38ae8b
commit 3f4cc46bc1
2 files changed
+5 -3

No files matched your search

@@ -121,7 +121,8 @@ public class GalleryPageView extends GLFrameLayout {
}
public void showInfo() {
mImage.setVisibility(GONE);
// For image valid rect
mImage.setVisibility(INVISIBLE);
mInfo.setVisibility(VISIBLE);
}
@@ -222,8 +222,9 @@ public class ImageView extends GLView implements ImageTexture.Callback {
mTextureHeight = 1;
}
// Start alpha animation
if (isAttachedToRoot()) {
// Start alpha animation, do not show animation for image has no valid rect
getValidRect(mValidRect);
if (!mValidRect.isEmpty()) {
startAnimation(mAlphaAnimation, true);
}
} else {