TextView字体和背景图片 设置透明度

背景图片透明度设置 

viewHolder.relative_layout.getBackground().setAlpha(225);     0  ---  225

((TextView)tv).setAlphe(float i) // api11引进的
0=<i=<1
i=0表示完全透明
i=1表示不透明

在android 2.3及以下使用setAlpha的方法。
AlphaAnimation alpha = new AlphaAnimation(0.7F, 0.7F);
alpha.setDuration(0); // Make animation instant
alpha.setFillAfter(true); // Tell it to persist after the animation ends
view.startAnimation(alpha);

原文地址:https://www.cnblogs.com/androidsj/p/4303398.html