I'm having trouble with the layout of my navigation bar. I was hoping to have an icon with text underneath it all centered in the button. Currently when the icon is drawn in it pushes the text off the page. The only way to get it back is by using android:drawablePadding="" (from here) using a negative value but it looks like this:
My xml looks like this:
<LinearLayout android:id="@+id/navbar"
android:layout_alignParentBottom="true" android:gravity="center"
android:layout_width="fill_parent" android:background="#001"
android:layout_height="60dip" android:layout_weight="1"
android:orientation="horizontal">
<Button android:layout_height="fill_parent" android:id="@+id/navhomebtn" android:enabled="false"
android:textColor="#FFF" android:background="@drawable/navbuttonselected" android:drawableTop="@drawable/homeicon"
android:drawablePadding="-40dip"
android:text="Home" android:layout_weight=".25" android:layout_width="0dip" />
<Button android:layout_height="fill_parent" android:id="@+id/navsearchbtn"
android:textColor="#FFF" android:background="@drawable/navbuttons"
android:text="Search" android:layout_weight=".25"
android:layout_width="0dip" />
<Button android:layout_height="fill_parent" android:id="@+id/navfavbtn"
android:textColor="#FFF" android:background="@drawable/navbuttons"
android:text="Favorites" android:layout_weight=".25"
android:layout_width="0dip" />
<Button android:layout_height="fill_parent" android:id="@+id/navlistbtn"
android:textColor="#FFF" android:background="@drawable/navbuttons"
android:text="Loans" android:layout_weight=".25"
android:layout_width="0dip" />
</LinearLayout>