2017-10-26 6 views
0

「Facebookと接続する」を表示したい。「Facebookでログインする」というデフォルトのテキストを変更する方法は?Facebookのログインテキストをカスタマイズする

私はandroid sdkバージョン4.18.0を使用しています。お気軽に。私はこの方法を使用して

<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"/> 

答えて

0

あなたのコードでこの

<com.facebook.login.widget.LoginButton 
     xmlns:facebook="http://schemas.android.com/apk/res-auto" 
     facebook:com_facebook_login_text="Connect with Facebook"/> 

UPD を試してみてください

 <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" /> 
+0

あなたは、はい、これ –

+0

@NileshRathodを試してみましたfacebookで –

+0

ログインするFacebook SDK 4.18.0.On 4.27.0のデフォルトのテキストである私の作品、それはと接続見せたいfacebook.Iを続行するように変更フェイスブック。 –

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" /> 
0

この行をコードに追加し、テキストを変更することができます。

<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" /> 
関連する問題