private static void setupForeground(View view, Drawable drawable, Integer color, Integer alpha) {
if (view instanceof IForeground) {
if (color != null) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
if (drawable instanceof RippleDrawable) {
RippleDrawable rippleDrawable = (RippleDrawable) drawable;
rippleDrawable.setColor(ColorStateList.valueOf(color));
if (alpha != null) {
rippleDrawable.setAlpha(alpha);
}
}
}
}
((IForeground) view).setForeground(drawable);
}
}
ForegroundDelegate.java 文件源码
java
阅读 18
收藏 0
点赞 0
评论 0
项目:LuaViewPlayground
作者:
评论列表
文章目录