本文整理汇总了Java中com.makeramen.roundedimageview.RoundedTransformationBuilder类的典型用法代码示例。如果您正苦于以下问题:Java RoundedTransformationBuilder类的具体用法?Java RoundedTransformationBuilder怎么用?Java RoundedTransformationBuilder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoundedTransformationBuilder类属于com.makeramen.roundedimageview包,在下文中一共展示了RoundedTransformationBuilder类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTransformation
import com.makeramen.roundedimageview.RoundedTransformationBuilder; //导入依赖的package包/类
private static Transformation getTransformation(Context context) {
if (PICASSO_CIRCLE_TRANSFORMATION == null) {
final int color;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
color = context.getResources().getColor(R.color.black);
} else {
color = context.getColor(R.color.black);
}
PICASSO_CIRCLE_TRANSFORMATION = new RoundedTransformationBuilder()
.borderColor(color)
.borderWidthDp(2)
.scaleType(ImageView.ScaleType.CENTER_CROP)
.oval(true)
.build();
}
return PICASSO_CIRCLE_TRANSFORMATION;
}
示例2: getCircleTransformation
import com.makeramen.roundedimageview.RoundedTransformationBuilder; //导入依赖的package包/类
/**
* Get circle transformation
* @param borderWidth in dp
* @param borderColor color of the border
*/
public static Transformation getCircleTransformation(int borderWidth, int borderColor) {
return new RoundedTransformationBuilder()
.oval(true)
.borderWidthDp(borderWidth)
.borderColor(borderColor)
.build();
}
示例3: getCircleTransformationNoBorder
import com.makeramen.roundedimageview.RoundedTransformationBuilder; //导入依赖的package包/类
/**
* Get circle transformation without border
*/
public static Transformation getCircleTransformationNoBorder() {
return new RoundedTransformationBuilder()
.oval(true)
.build();
}
示例4: getRoundedTransformation
import com.makeramen.roundedimageview.RoundedTransformationBuilder; //导入依赖的package包/类
public static Transformation getRoundedTransformation(Context context)
{
return new RoundedTransformationBuilder()
.borderColor(context.getResources().getColor(R.color.divider_translucent)).borderWidthDp(1)
.cornerRadiusDp(48).oval(true).build();
}
示例5: roundedTransformation
import com.makeramen.roundedimageview.RoundedTransformationBuilder; //导入依赖的package包/类
public RoundedTransformationBuilder roundedTransformation() {
return new RoundedTransformationBuilder();
}