android - facebook Login button customization -
using facebook sdk 4.6.0 trying use facebook login integration in android app. com.facebook.login.widget.loginbutton shows following button
i want change text "login facebook" "facebook" only
i have tried solutions provided previously, none of them worked me. probable reason think of answered question facebook sdk 3.0 seems fails facebook sdk 4.6.0
i tried:
modifying loginbutton class locked
xmlns:facebook="http://schemas.android.com/apk/res-auto" using schema in loginbutton , changing text using facbook:login_text="login", facebook:com_facebook_login_text="login" both failed work
this dependencies facebook sdk compile 'com.facebook.android:facebook-android-sdk:4.6.0'
this loginbutton xml
<com.facebook.login.widget.loginbutton android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/buttonregisterfacebook" android:padding="10dp" />
please suggest way change text , change fb logo image size
edit : understand why none of stated method working me. facebook sdk files locked
i tried unlocking clicking on lock button @ bottum right corner in android studio nothing happens. suggestions how unlock fb sdk files. fb sdk version 4.6.0
please change here in code of loginbutton.java class of facebook sdk
protected void configurebutton( final context context, final attributeset attrs, final int defstyleattr, final int defstyleres) { super.configurebutton(context, attrs, defstyleattr, defstyleres); setinternalonclicklistener(new loginclicklistener()); parseloginbuttonattributes(context, attrs, defstyleattr, defstyleres); if (isineditmode()) { // cannot use drawable in edit mode, setting background color instead // of background resource. setbackgroundcolor(getresources().getcolor(r.color.com_facebook_blue)); // hardcoding in edit mode getresources().getstring() doesn't seem work in // intellij logintext = "facebook"; } else { accesstokentracker = new accesstokentracker() { @override protected void oncurrentaccesstokenchanged( accesstoken oldaccesstoken, accesstoken currentaccesstoken) { setbuttontext(); } }; } setbuttontext(); }
Comments
Post a Comment