Code example for AlphaAnimation

Methods: setDuration, setFillAfter, startAnimation

0
            if (view!= null) {
                // 下载完成。显示图片。 
                ViewHolder holder = (ViewHolder) view.getTag();
                holder.iv.setImageBitmap(bmp);
                if (firstTime[index]){
                    animation = new AlphaAnimation(0f, 1.0f);
                    animation.setDuration(200);
                    animation.setFillAfter(true);
                    holder.iv.startAnimation(animation);
                    firstTime[index] = false;
                } 
                holder.pb.setVisibility(View.GONE);
                /* 
                 * 这里不对bmp参数做任何保存!让libiadc进行图片缓存处理。 
                 */ 
            } 
        } 
        private AlphaAnimation animation;
    } 
    private ImageTaskCallBack callBack;