FontTextView.java 文件源码

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

项目:mvvm-template 作者:
public void setEventsIcon(@DrawableRes int drawableRes) {
    Drawable drawable = ContextCompat.getDrawable(getContext(), drawableRes);
    int width = drawable.getIntrinsicWidth();
    int height = drawable.getIntrinsicHeight();
    drawable.setBounds(0, 0, width / 2, height / 2);
    ScaleDrawable sd = new ScaleDrawable(drawable, Gravity.CENTER, 0.6f, 0.6f);
    sd.setLevel(8000);
    ViewHelper.tintDrawable(drawable, ViewHelper.getTertiaryTextColor(getContext()));
    setCompoundDrawablesWithIntrinsicBounds(sd, null, null, null);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号