当前位置: 首页>>代码示例>>Java>>正文


Java RoundingParams.fromCornersRadius方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:malah-code,项目名称:Open-Quran-Radio,代码行数:24,代码来源:MainActivity.java

示例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();
}
 
开发者ID:lizubing1992,项目名称:Li-MVPArms,代码行数:18,代码来源:FrescoHelper.java

示例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();
	}
 
开发者ID:lizubing1992,项目名称:Li-MVPArms,代码行数:19,代码来源:FrescoHelper.java

示例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;
  }
 
开发者ID:lizubing1992,项目名称:Li-MVPArms,代码行数:15,代码来源:ConfigConstants.java

示例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;
    }
 
开发者ID:wangkang0627,项目名称:android-support-learn,代码行数:15,代码来源:PApplication.java

示例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;
    }
 
开发者ID:succlz123,项目名称:BlueBoard,代码行数:15,代码来源:FrescoConfig.java

示例7: getRoundingParams

import com.facebook.drawee.generic.RoundingParams; //导入方法依赖的package包/类
public static RoundingParams getRoundingParams(float radius) {
    return RoundingParams.fromCornersRadius(radius);
}
 
开发者ID:imliujun,项目名称:FrescoCustomCacheKey,代码行数:4,代码来源:FrescoImageLoader.java


注:本文中的com.facebook.drawee.generic.RoundingParams.fromCornersRadius方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。