本文整理汇总了Java中com.facebook.drawee.generic.RoundingParams.fromCornersRadius方法的典型用法代码示例。如果您正苦于以下问题:Java RoundingParams.fromCornersRadius方法的具体用法?Java RoundingParams.fromCornersRadius怎么用?Java RoundingParams.fromCornersRadius使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.facebook.drawee.generic.RoundingParams
的用法示例。
在下文中一共展示了RoundingParams.fromCornersRadius方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillUserProfileData
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
private void fillUserProfileData() {
SimpleDraweeView imageView = (SimpleDraweeView) navigationView.getHeaderView(0).findViewById(R.id.imageView);
TextView txtUserProfileName = (TextView) navigationView.getHeaderView(0).findViewById(R.id.txtUserProfileName);
TextView txtProfileEmail = (TextView) navigationView.getHeaderView(0).findViewById(R.id.txtProfileEmail);
// Check if user is signed in (non-null) and update UI accordingly.
FirebaseUser currentUser = mAuth.getCurrentUser();
// Name, email address, and profile photo Url
txtUserProfileName.setText(currentUser.getDisplayName());
txtProfileEmail.setText(currentUser.getEmail());
Uri photoUrl = currentUser.getPhotoUrl();
//set round icon
if (photoUrl != null) {
int color = ContextCompat.getColor(this, R.color.colorPrimary);
RoundingParams roundingParams = RoundingParams.fromCornersRadius(5f);
roundingParams.setBorder(color, 1.0f);
roundingParams.setRoundAsCircle(true);
imageView.getHierarchy().setRoundingParams(roundingParams);
imageView.setImageURI(photoUrl);//.setImageBitmap(stationImageSmall);
}
}
示例2: getImageViewHierarchy
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
/**
* 图像选项类
* @param isRound 是否圆角
* @param radius 圆角角度
* @return
*/
public static GenericDraweeHierarchy getImageViewHierarchy(Resources resources, boolean isRound, float radius) {
GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(resources);
builder.setFailureImage(resources.getDrawable(R.drawable.ic_loading));
builder.setPlaceholderImage(resources.getDrawable(R.drawable.ic_loading));
builder.setFadeDuration(300);
if (isRound) {
RoundingParams roundingParams = RoundingParams.fromCornersRadius(radius);
builder.setRoundingParams(roundingParams);
}
return builder.build();
}
示例3: getImageProgHierarchy
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
/**
* 图像选项类
* @param resources Resources
* @param isRound 是否圆角
* @param radius 圆角角度
*/
public static GenericDraweeHierarchy getImageProgHierarchy(Resources resources, boolean isRound, float radius) {
GenericDraweeHierarchyBuilder builder = new GenericDraweeHierarchyBuilder(resources);
builder.setFailureImage(resources.getDrawable(R.drawable.ic_loading));
builder.setPlaceholderImage(resources.getDrawable(R.drawable.ic_loading));
// builder.setProgressBarImage(new CustomProgressbarDrawable());
builder.setFadeDuration(300);
if (isRound) {
RoundingParams roundingParams = RoundingParams.fromCornersRadius(radius);
builder.setRoundingParams(roundingParams);
}
return builder.build();
}
示例4: getRoundingParams
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
public static RoundingParams getRoundingParams(){
RoundingParams roundingParams = RoundingParams.fromCornersRadius(7f);
// roundingParams.asCircle();//圆形
// roundingParams.setBorder(color, width);//fresco:roundingBorderWidth="2dp"边框 fresco:roundingBorderColor="@color/border_color"
// roundingParams.setCornersRadii(radii);//半径
// roundingParams.setCornersRadii(topLeft, topRight, bottomRight, bottomLeft)//fresco:roundTopLeft="true" fresco:roundTopRight="false" fresco:roundBottomLeft="false" fresco:roundBottomRight="true"
// roundingParams. setCornersRadius(radius);//fresco:roundedCornerRadius="1dp"圆角
// roundingParams.setOverlayColor(overlayColor);//fresco:roundWithOverlayColor="@color/corner_color"
// roundingParams.setRoundAsCircle(roundAsCircle);//圆
// roundingParams.setRoundingMethod(roundingMethod);
// fresco:progressBarAutoRotateInterval="1000"自动旋转间隔
// 或用 fromCornersRadii 以及 asCircle 方法
return roundingParams;
}
示例5: getRoundingParams
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
public static RoundingParams getRoundingParams(){
RoundingParams roundingParams = RoundingParams.fromCornersRadius(7f);
// roundingParams.asCircle();//圆形
// roundingParams.setBorder(color, width);//fresco:roundingBorderWidth="2dp"边框 fresco:roundingBorderColor="@color/border_color"
// roundingParams.setCornersRadii(radii);//半径
// roundingParams.setCornersRadii(topLeft, topRight, bottomRight, bottomLeft)//fresco:roundTopLeft="true" fresco:roundTopRight="false" fresco:roundBottomLeft="false" fresco:roundBottomRight="true"
// roundingParams. setCornersRadius(radius);//fresco:roundedCornerRadius="1dp"圆角
// roundingParams.setOverlayColor(overlayColor);//fresco:roundWithOverlayColor="@color/corner_color"
// roundingParams.setRoundAsCircle(roundAsCircle);//圆
// roundingParams.setRoundingMethod(roundingMethod);
// fresco:progressBarAutoRotateInterval="1000"自动旋转间隔
// 或用 fromCornersRadii 以及 asCircle 方法
return roundingParams;
}
示例6: getRoundingParams
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
public static RoundingParams getRoundingParams() {
RoundingParams roundingParams = RoundingParams.fromCornersRadius(7f);
// roundingParams.asCircle();//圆形
// roundingParams.setBorder(color, width);//fresco:roundingBorderWidth="2dp"边框 fresco:roundingBorderColor="@color/border_color"
// roundingParams.setCornersRadii(radii);//半径
// roundingParams.setCornersRadii(topLeft, topRight, bottomRight, bottomLeft)//fresco:roundTopLeft="true" fresco:roundTopRight="false" fresco:roundBottomLeft="false" fresco:roundBottomRight="true"
// roundingParams. setCornersRadius(radius);//fresco:roundedCornerRadius="1dp"圆角
// roundingParams.setOverlayColor(overlayColor);//fresco:roundWithOverlayColor="@color/corner_color"
// roundingParams.setRoundAsCircle(roundAsCircle);//圆
// roundingParams.setRoundingMethod(roundingMethod);
// fresco:progressBarAutoRotateInterval="1000"自动旋转间隔
// 或用 fromCornersRadii 以及 asCircle 方法
return roundingParams;
}
示例7: getRoundingParams
import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
public static RoundingParams getRoundingParams(float radius) {
return RoundingParams.fromCornersRadius(radius);
}