Fresco-------设置圆形图片、ButterKnife

Adapter

//设置圆形图片
        RoundingParams params = RoundingParams.asCircle();
        GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(Resources.getSystem());
        GenericDraweeHierarchy hierarchy = builder.setRoundingParams(params).build();
        viewholder.simplImage.setHierarchy(hierarchy);
        viewholder.simplImage.setImageURI(Uri.parse(list.get(i).getImageUrl()));

另一种在XML方法

 app:roundAsCircle="true"

ButterKnife依赖

implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

你可能感兴趣的:(Fresco-------设置圆形图片、ButterKnife)