Closed agramian closed 6 years ago
+1
seems you can only extend this View and change the drawShadow method:
private void drawShadow(float shadowRadius, int shadowColor) {
this.shadowRadius = shadowRadius;
this.shadowColor = shadowColor;
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.HONEYCOMB) {
setLayerType(LAYER_TYPE_SOFTWARE, paintBorder);
}
paintBorder.setShadowLayer(shadowRadius, 0.0f, 0.0f, shadowColor);
}
Fix in https://github.com/lopspower/CircularImageView/commit/271b47dd4f74475af66dc8e72a5b045b89f1a83e
You can now set shadowGravity with setShadowGravity
method or with civ_shadow_gravity
(center, top, bottom, start or end)
Currently the shadow is drawn slightly offset from the center of the ImageView so that the shadow is visibly thicker on the bottom than the top. Is it possible to center the shadow so that it is even all the way around the image?