如何把TextView的背景设置成从黑色到透明渐变
1个回答
展开全部
可以TransitionDrawable用这个类来实现
final TransitionDrawable td =
new TransitionDrawable(new Drawable[] {
new ColorDrawable(android.R.color.transparent),
new BitmapDrawable(mResources, bitmap)
});
imageView.setImageDrawable(td);
td.startTransition(400);
final TransitionDrawable td =
new TransitionDrawable(new Drawable[] {
new ColorDrawable(android.R.color.transparent),
new BitmapDrawable(mResources, bitmap)
});
imageView.setImageDrawable(td);
td.startTransition(400);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询