use of carbon.view.TintedView in project Carbon by ZieIony.
the class Carbon method getBackgroundTintAlpha.
public static float getBackgroundTintAlpha(View child) {
if (!(child instanceof TintedView))
return 255;
ColorStateList tint = ((TintedView) child).getBackgroundTint();
if (tint == null)
return 255;
int color = tint.getColorForState(child.getDrawableState(), tint.getDefaultColor());
return (color >> 24) & 0xff;
}
Aggregations