Question: I am building an android app using facebook login and google plus login. and I am finding it hard to make custom buttons for both of these. Is there a way to change it? 

I am using android studio 1.4 and using gradle dependencies to add g+ and fb login like this

```
dependencies 
{
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
}

```

Answer: 
**fblogin\_button\_selector.xml** in drawable folder.

```
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="true">
        <shape android:shape="rectangle" >
            <corners android:radius="5dp" />
            <solid android:color="@color/com_facebook_button_background_color_pressed" />
        </shape>
    </item>

    <item>
        <shape android:shape="rectangle" >
            <corners android:radius="5dp" />
            <solid android:color="@color/com_facebook_button_background_color" />
        </shape>
    </item>
</selector>

```

**Custom FB Login Button** in your layout.

```
 <Button
   android:layout_width="match_parent"
   android:layout_height="wrap_content"
   android:id="@+id/login"
   android:layout_centerHorizontal="true"
   android:paddingStart="@dimen/dp_50"
   android:paddingLeft="@dimen/dp_50"
   android:drawableLeft="@drawable/com_facebook_button_icon"
   android:textSize="@dimen/sp_15"
   android:background="@drawable/com_facebook_button_background"
   android:text="Connect "
   android:textColor="@android:color/white"/>

```

output : 

[![enter image description here](https://i.stack.imgur.com/h3a7Y.png)](https://i.stack.imgur.com/h3a7Y.png)

Using this you can also implement G+ Login Button.
For me, this solution works,

**button on xml**

```
<com.facebook.login.widget.LoginButton
        android:id="@+id/button_facebook"
        xmlns:fb="http://schemas.android.com/apk/res-auto"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:backgroundTint="@android:color/transparent"
        style="@style/FacebookLoginButton"
        android:longClickable="false" />

```

Change on **styles.xml**,

```
<style name="FacebookLoginButton">
    <item name="android:textSize">16sp</item>
    <item name="android:layout_marginTop">10dp</item>
    <item name="android:layout_marginBottom">10dp</item>
    <item name="android:layout_gravity">center_horizontal</item>
</style>

```