ReportView.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:androidApp 作者:
private void setShadow(int drawableId) {
    Drawable original = ContextCompat.getDrawable(TranSappApplication.getAppContext(), drawableId) ;
    Drawable shadow = getClone(original).mutate();
    toGrayScale(shadow);

    Drawable background = getClone(original).mutate();
    background.setColorFilter(
            ContextCompat.getColor(getContext(), R.color.background_white), PorterDuff.Mode.SRC_ATOP);

    Drawable drawableArray[]= new Drawable[]{background, shadow};
    LayerDrawable layerDraw = new LayerDrawable(drawableArray);


    clipDrawable = new ClipDrawable(layerDraw, Gravity.BOTTOM, ClipDrawable.VERTICAL);
    this.shadow.setImageDrawable(clipDrawable);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号