I ended up redefining the text as an empty string, and then defined the setBackgroundResource buttons on my image (did not need a dynamic login / logout function)
<com.facebook.widget.LoginButton xmlns:fb="http://schemas.android.com/apk/res-auto" android:id="@+id/login_button" android:layout_width="249dp" android:layout_height="45dp" android:layout_above="@+id/textView1" android:layout_centerHorizontal="true" android:layout_gravity="center_horizontal" android:layout_marginBottom="30dp" android:layout_marginTop="30dp" android:contentDescription="@string/login_desc" android:scaleType="centerInside" fb:login_text="" fb:logout_text="" />
And in the code, I defined a background resource:
final LoginButton button = (LoginButton) findViewById(R.id.login_button); button.setBackgroundResource(R.drawable.facebook);
Kind of a workaround, but I preferred it to change the SDK code for Facebook (although it is very straight forward), and worry about updating every time I update their version.
Michael May 13 '13 at 21:42 2013-05-13 21:42
source share