android - 9-patch background does not align with button and is too big? -
i'm getting kinda frustated since i've been stuck on issue day. i've created different 9-patch background pngs each dpi folder , connected button image yet image big. heres button in activity_mail.xml
<button android:id="@+id/button5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/button11" android:layout_below="@+id/textview4" android:layout_margintop="16dp" android:text="@string/fifty_lp" android:background="@drawable/custom" />
my buttom.xml in drawable-hdpi folder:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true" android:drawable="@drawable/example"></item> <item android:state_focused="false" android:drawable="@drawable/example"></item> <item android:drawable="@drawable/example"></item> </selector>
this shows up. messes relative layout , other buttons. ran , when pressed huge button, worked should big. http://i42.tinypic.com/be6efn.jpg
Comments
Post a Comment