定制Android的Facebook的登录按钮 [英] customize Android Facebook Login button
本文介绍了定制Android的Facebook的登录按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要定制Facebook登录按钮,这是我们获得与Facebook的SDK以及为Android(Facebook的Android的SDK-3.0.1)的外观。我想要一个简单的Android按钮,通过Facebook登录有标题。我无法找到有关的任何文件。
i want to customize the look of the facebook login button which we get along with the facebook sdk for android (facebook-android-sdk-3.0.1). i want a simple android button which has title "Login via facebook". i could not find any documentation regarding that.
因此,如果任何人知道如何做一个简单的方法,请告诉我,或直接我就怎么做吧。
so if any one knows on how to do it in a simple way, please tell me or direct me on how to do it.
推荐答案
您可以使用样式像这样modifiy登录按钮
You can use styles for modifiy the login button like this
<style name="FacebookLoginButton">
<item name="android:textSize">@dimen/smallTxtSize</item>
<item name="android:background">@drawable/facebook_signin_btn</item>
<item name="android:layout_marginTop">10dp</item>
<item name="android:layout_marginBottom">10dp</item>
<item name="android:layout_gravity">center_horizontal</item>
</style>
和布局
<com.facebook.widget.LoginButton
xmlns:fb="http://schemas.android.com/apk/res-auto"
android:id="@+id/loginFacebookButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
fb:login_text="@string/loginFacebookButton"
fb:logout_text=""
style="@style/FacebookLoginButton"/>
这篇关于定制Android的Facebook的登录按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文