我有一個動畫列表組成的(略)不同的大小。我有一個ImageView
與layout_width
和layout_height
設置爲wrap_content
。我設置了動畫列表是我ImageView
的內容和如下啓動動畫:AnimationDrawable動畫列表與各種大小的drawables?
AnimationDrawable my_animation_list = (AnimationDrawable)getResources().getDrawable(
R.drawable.my_animation_list);
myImageView.setImageDrawable(my_animation_list)
((AnimationDrawable)myImageView.getDrawable()).start();
我需要和期望的ImageView
調整其高度和寬度與在動畫列表中的每個幀/圖像。相反,它看起來像是ImageView
取得動畫列表中第一幀的高度和寬度,然後縮放動畫列表中的所有幀以適應此初始高度和寬度。任何人都知道我怎樣才能得到一個AnimationDrawable
(動畫列表),包括各種尺寸圖像的與ImageView
工作,或工作,甚至左右?..