Closed chenjiufu95 closed 3 years ago
setShadowsColors() 屏蔽阴影 无效, 设置sShadowColors,后 没有改变mShadowColors,设置无效
/* Top and bottom shadows colors / public static int[] sShadowColors = new int[] { 0xffffffff, 0x88ffffff, 0x00ffffff }; private int[] mShadowColors = sShadowColors;
public void setShadowsColors(@ColorInt int[] colors) { sShadowColors = colors; resetShadow(); } private void resetShadow() { if (mShadowColors == null) { mStartShadow = null; mEndShadow = null; } else { if (isHorizontal()) { mStartShadow = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, mShadowColors); mEndShadow = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, mShadowColors); } else { mStartShadow = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, mShadowColors); mEndShadow = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, mShadowColors); } } }
感谢,v3.0.2已修复该问题
setShadowsColors() 屏蔽阴影 无效, 设置sShadowColors,后 没有改变mShadowColors,设置无效
/* Top and bottom shadows colors / public static int[] sShadowColors = new int[] { 0xffffffff, 0x88ffffff, 0x00ffffff }; private int[] mShadowColors = sShadowColors;
public void setShadowsColors(@ColorInt int[] colors) { sShadowColors = colors; resetShadow(); } private void resetShadow() { if (mShadowColors == null) { mStartShadow = null; mEndShadow = null; } else { if (isHorizontal()) { mStartShadow = new GradientDrawable(GradientDrawable.Orientation.LEFT_RIGHT, mShadowColors); mEndShadow = new GradientDrawable(GradientDrawable.Orientation.RIGHT_LEFT, mShadowColors); } else { mStartShadow = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, mShadowColors); mEndShadow = new GradientDrawable(GradientDrawable.Orientation.BOTTOM_TOP, mShadowColors); } } }