- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在我的应用中设置 profilepictureview:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="fr.djey.testf.MainFragment"
xmlns:facebook="http://schemas.android.com/apk/res-auto">
<com.facebook.login.widget.ProfilePictureView
android:id="@+id/facebook_avatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/login_button"
android:layout_centerHorizontal="true"
/>
<com.facebook.login.widget.LoginButton
android:id="@+id/login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="30dp"
android:layout_marginBottom="30dp"
android:layout_centerInParent="true"/>
</RelativeLayout>
而且我想给图片设置小尺寸。我在互联网上发现我必须输入 facebook:preset_size=small 但它似乎不再存在了。
你能告诉我是否有另一种方法可以在 xml 中(而不是在 java 中)执行此操作吗?
最佳答案
它已被替换为:
facebook:com_facebook_preset_size="小"
在父布局中添加:
xmlns:facebook="http://schemas.android.com/apk/res-auto"
在升级指南中有描述: https://developers.facebook.com/docs/android/upgrading-4.x --> 将 Android SDK 从 4.0.1 升级到 4.1.0
关于android Facebook :preset_size doesn't exist in xml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32452617/
尽管我查看了该类并且 preset_size 在该包下,但我一直收到错误 No resource identifier found for attribute 'preset_size'
我正在尝试在我的应用中设置 profilepictureview: 而且我想给图片设置小尺寸。我在互联网上发现我必须输入 facebook:preset_size=small
我正在尝试更改我的 ProfilePictureView 的大小(太小),但我无法通过 XML 进行更改: 我试过小号、大号和普通号,但尺寸保持不变,就好像那条线没有效果一样。你们能
我是一名优秀的程序员,十分优秀!