use of im.actor.sdk.view.avatar.CoverOverlayDrawable in project actor-platform by actorapp.
the class CoverAvatarView method init.
private void init() {
if (isInEditMode()) {
return;
}
GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(getResources());
builder.setActualImageScaleType(ScalingUtils.ScaleType.CENTER_CROP);
builder.setOverlay(new CoverOverlayDrawable(getContext()));
if (ActorSDK.sharedActor().style.getAvatarBackgroundResourse() != 0) {
builder.setPlaceholderImage(getResources().getDrawable(ActorSDK.sharedActor().style.getAvatarBackgroundResourse()), ScalingUtils.ScaleType.CENTER_CROP);
} else {
builder.setPlaceholderImage(new ColorDrawable(ActorSDK.sharedActor().style.getAvatarBackgroundColor()));
}
builder.setFadeDuration(0);
setHierarchy(builder.build());
}
Aggregations