使用TransitionDrawable实现渐变效果

2015-07-24 0 404
使用TransitionDrawable实现渐变效果
    private void setImageBitmap(ImageView imageView, Bitmap bitmap) {  
        final TransitionDrawable td = new TransitionDrawable(new Drawable[] {  
                new ColorDrawable(android.R.color.transparent),  
                new BitmapDrawable(getResources(), bitmap) });  
        imageView.setBackgroundDrawable(imageView.getDrawable());  
        imageView.setImageDrawable(td);  
        td.startTransition(200);  
    }  

遇见资源网 java 使用TransitionDrawable实现渐变效果 http://www.ox520.com/9533.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务