我想要显示“与脸书连接”.How我可以更改显示“登录脸书”的默认文本。
我使用的是android sdk版本4.18.0。谢谢。
<com.facebook.login.widget.LoginButton
android:id="@+id/connect_with_FB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />发布于 2017-10-26 17:45:23
尝尝这个
<com.facebook.login.widget.LoginButton
xmlns:facebook="http://schemas.android.com/apk/res-auto"
facebook:com_facebook_login_text="Connect with Facebook"/>使用您的代码进行更新:
<com.facebook.login.widget.LoginButton
xmlns:facebook="http://schemas.android.com/apk/res-auto"
facebook:com_facebook_login_text="Connect with Facebook"
android:id="@+id/connect_with_FB"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"/>发布于 2017-10-26 18:29:49
我使用这种方式,它是工作:
<com.facebook.login.widget.LoginButton
android:id="@+id/fragment_login_btn_loginWithFacebook"
xmlns:fb="http://schemas.android.com/apk/res-auto"
fb:login_text="Custom login text bla bla"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" />发布于 2017-10-26 18:33:03
将这一行添加到您的代码中,您就可以更改文本了。
<com.facebook.login.widget.LoginButton
android:id="@+id/connect_with_FB"
facebook:com_facebook_login_text="addTextHere"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp" />https://stackoverflow.com/questions/46950992
复制相似问题