使用TransitionDrawable实现渐变效果,, private
分享于 点击 41642 次 点评:285
使用TransitionDrawable实现渐变效果,, private
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); }
用户点评