我已经尝试了几个我能找到的答案,但没有一个能用于最新的Facebook Android SDK 4.0版。
如何使用最新的SDK更改布局高度?
答案 0 :(得分:148)
只需设置paddingTop和paddingBottom。它对我有用。
<com.facebook.login.widget.LoginButton
android:id="@+id/login_facebook_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:layout_marginRight="30dp"
android:layout_marginLeft="30dp"/>
答案 1 :(得分:26)
对于height
(或者不是使用单独的xml样式或以编程方式)
按钮的padding
由其textSize
和<com.facebook.login.widget.LoginButton
xmlns:facebook="http://schemas.android.com/apk/res-auto"
facebook:com_facebook_login_text="Log in with Facebook"
android:id="@+id/login_button"
android:textSize="15sp"
android:paddingTop="15sp" <!--increase more until it matches ur requirement -->
android:paddingBottom="15sp">
决定。
因此,如果您想增加按钮大小,请执行以下操作
<customErrors mode="On">
<error redirect="/error/401" statusCode="401" />
<error redirect="/error/500" statusCode="500" />
</customErrors>
希望它有所帮助!!
答案 2 :(得分:1)
无需创建自定义LoginButton
。
您只需按照here所述的方式更改LoginButton
参数。