我使用了 ScaleAnimation
来调整我的 ImageView
的大小。但是在动画完成后,我应该如何获取我的 ImageView
或其中的位图的尺寸。
这是我的代码:
ScaleAnimation animation = new ScaleAnimation(m_oldZoomRatio, m_currentZoomRatio, m_oldZoomRatio, m_currentZoomRatio);
animation.setFillAfter(true);
animation.setFillEnabled(true);
animation.setAnimationListener(new AnimationListener() {
public void onAnimationStart(Animation animation) {
}
public void onAnimationRepeat(Animation animation) {
}
public void onAnimationEnd(Animation animation) {
}
});
m_child.startAnimation(animation);
当 m_oldZoomRatio != m_currentZoomRatio
时。
我可以看到我的视图在运行时会改变其布局。但是当获取它的宽度和高度时,我收到的是创建视图时的原始值。