protected void inflateHierarchy(Context context, @Nullable AttributeSet attrs) { Resources resources = context.getResources(); GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(resources) .setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER); GenericDraweeHierarchyInflater.updateBuilder(builder, context, attrs); setAspectRatio(builder.getDesiredAspectRatio()); setHierarchy(builder.build()); }
protected void inflateHierarchy(Context context, @Nullable AttributeSet attrs) { GenericDraweeHierarchyBuilder builder = GenericDraweeHierarchyInflater.inflateBuilder(context, attrs); setAspectRatio(builder.getDesiredAspectRatio()); setHierarchy(builder.build()); }