Ste*_*fen 52 android facebook android-xml facebook-login facebook-sdk-4.0
我已经尝试了几个我能找到的答案,但没有一个能与最新的Facebook Android SDK 4.0一起使用.
如何使用最新的SDK更改布局高度?
Tia*_*ins 159
只需设置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"/>
Run Code Online (Sandbox Code Playgroud)
Raf*_*med 27
对于Facebook SDK v4.x(或者不是使用单独的xml样式或以编程方式)
该height按钮是由其决定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="15dp" <!--increase more until it matches ur requirement -->
android:paddingBottom="15dp">
Run Code Online (Sandbox Code Playgroud)
希望能帮助到你!!