我正在尝试自定义Facebook SDK 4.0(Android)中的登录按钮,但是没有办法...我在寻找Fb Docs,但没有结果。有什么想法吗?

提前致谢!

最佳答案

您的按钮

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


在你的活动中

LoginButton authbutton = (LoginButton) findViewById(R.id.login_button);
authbutton.setBackgroundResource(R.drawable.facebook);
authButton.setCompoundDrawablesWithIntrinsicBounds(0, 0, 0,0);

关于android - 使用Facebook SDK 4(Android)的自定义按钮,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29478534/

10-10 23:43
查看更多