不改变view 的背景形状的情况下改变颜色

    GradientDrawable myGrad = (GradientDrawable) tv_target.getBackground();
    int color = getAlphaColor(255, getAlphaColor1(255, 81, alpha), getAlphaColor1(255, 83, alpha), 1); // 动态生成的颜色,可用来过度
    myGrad.setColor(color);

 

posted on 2017-09-27 16:03  leojiao123  阅读(86)  评论(0编辑  收藏  举报

导航