I am trying to create a 9-patch image but the text is not being accommodated correctly on the button.

the text should sit at the center of the button on Facebook login.
this is the original png

Tried this kinda 9patch

ended up like this

Button XML code:
<Button
android:id="@+id/button1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginLeft="25dp"
android:layout_marginRight="25dp"
android:background="@drawable/splash_facebook_button_selector"
android:gravity="center"
android:text="@string/splash_facebook"
android:textColor="#FFFFFF"
android:textSize="8pt"
android:textStyle="bold" />
You need to set gravity for your button: