Search code examples
androidfacebook-android-sdk

How to apply Material Design Facebook button in android


I'm using compile 'com.facebook.android:facebook-android-sdk:4.7.0' and:

<com.facebook.login.widget.LoginButton
      android:id="@+id/tutorial_button_login"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_centerHorizontal="true"
      android:layout_marginBottom="16dp"
      />

But the button looks so ugly: Example

Is there any way to make it look materialized or more cooler?


Solution

  • I ended up setting paddings.

    <com.facebook.login.widget.LoginButton
          android:id="@+id/tutorial_button_login"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_centerHorizontal="true"
          android:paddingBottom="16dp"
          android:paddingTop="16dp"
          android:paddingRight="16dp"
          android:paddingLeft="16dp"
          android:layout_marginBottom="@dimen/activity_vertical"
          />