改变profilepictureview的大小:实:preset_size没有效果 [英] change the size of the profilepictureview : Facebook:preset_size has no effect

查看:258
本文介绍了改变profilepictureview的大小:实:preset_size没有效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改变我的ProfilePictureView(过小)的规模,但我不能通过XML做到这一点:

I'm trying to change the size of my ProfilePictureView (too small), but i can't do it via XML :

        <com.facebook.widget.ProfilePictureView
        android:id="@+id/userProfilePicture"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center"
        android:gravity="center_horizontal"
        facebook:preset_size="large"
        />

我尝试过小,大,正常的,但大小保持不变,就像如果该行没有任何影响。 你们能告诉什么是错的code?或如何改变profilepictureview的大小(通过Java或XML)。

I've tried small, large and normal but the size remains the same, like if that line has no effect. Can you guys tell what's wrong with the code ? or how to change the size of profilepictureview (via Java or XML).

谢谢:)

推荐答案

在你的java code您可以使用设置presetSize(your_ preferred_size)

in your java code you can use setPresetSize(your_preferred_size)

您可以选择:

ProfilePictureView.LARGE
ProfilePictureView.NORMAL
ProfilePictureView.SMALL
ProfilePictureView.CUSTOM

这篇关于改变profilepictureview的大小:实:preset_size没有效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆