2
Animation anim = new ScaleAnimation(0.0f, 1.0f, 0.0f, 1.0f, Animation.RELATIVE_TO_SELF, (float)0.5, Animation.RELATIVE_TO_SELF, (float)0.5);
anim.setFillAfter(true); // Needed to keep the result of the animation
anim.setDuration((long) durationPlayer);
imageView1.startAnimation(anim);
這就是我要縮放ImageView的,我想如果可能的話做的就是點擊一個按鈕的刻度值,0.0F和1.0F之間。基本上我需要獲取ImageView的寬度和高度值,但直接檢查這些值只會返回寬度和高度,比例因子爲1.我已使用Google搜索,但找不到任何內容,是否意味着它完全可能?任何其他想法都會有所幫助。獲取imageviews當前刻度
簡而言之,它有可能在尺度動畫中獲取圖像視圖的大小。