/**     *  设置着色图片     * @param context context对象     * @param resourceId 图片资源id     * @param color 颜色资源id     * @return 图片     */    public static Drawable GetTintDrawable(Context context, int resourceId, int color) {        Drawable originalDrawable = ContextCompat.getDrawable(context, resourceId);        assert originalDrawable != null;        Drawable tintDrawable = DrawableCompat.wrap(originalDrawable).mutate();        DrawableCompat.setTintList(tintDrawable, ContextCompat.getColorStateList(context, color));        return tintDrawable;    }

更多相关文章

  1. android添加图片到本地,无法即使刷新的解决方法
  2. Android 实现图片加水印
  3. android仿探探图片拖拽功能
  4. android 图片放大缩小
  5. android ImageView实现图片浏览器(点击左侧显示上一张,点击右侧显
  6. android中图片的处理(绘制圆形,圆角||缩略图)
  7. 无法获取'https://jcenter.bintray.com/com/网站的资源
  8. android 比较靠谱的图片压缩
  9. Android 保存图片到系统相册

随机推荐

  1. Unknown error: Unable to build: the fi
  2. Android中的通知—Notification
  3. Android 数据Parcel序列化过程源码分析
  4. Android 实现语音识别的完整代码
  5. Android之Media播放器源码分析(framework
  6. Android 中使用代码动态网格布局
  7. Android中应用程序drawable图片资源占用
  8. android studio gradle/gradle plugin 配
  9. android动态壁纸
  10. android实现程序的后台运行 and 完全退出