ProfilePictureEditView.java 文件源码

java
阅读 21 收藏 0 点赞 0 评论 0

项目:InsanityRadio-Android 作者:
@Override
protected ImageView makeImage() {
    defaultProfilePicture = drawables.getDrawable(Socialize.DEFAULT_USER_ICON);
    profilePicture = new ImageView(getContext());

    int imageSize = displayUtils.getDIP(64);
    int imagePadding = displayUtils.getDIP(4);

    LayoutParams imageLayout = new LinearLayout.LayoutParams(imageSize,imageSize);

    GradientDrawable imageBG = new GradientDrawable(Orientation.BOTTOM_TOP, new int[] {Color.WHITE, Color.WHITE});
    imageBG.setStroke(2, Color.BLACK);
    imageBG.setAlpha(64);

    profilePicture.setLayoutParams(imageLayout);
    profilePicture.setPadding(imagePadding, imagePadding, imagePadding, imagePadding);

    CompatUtils.setBackgroundDrawable(profilePicture, imageBG);

    profilePicture.setScaleType(ScaleType.CENTER_CROP);

    return profilePicture;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号