I want to have an image to the left of a text. I want both the image and the text to be at the horizontal center of the screen. So I created the layout below. But while everything looks correct on the eclipse Graphical Layout, on a real device, the image keeps appearing on top of the image, as if I had used drawableTop.
<RelativeLayout
android:id="@+id/animal"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_below="@id/the_bar"
android:layout_centerHorizontal="true"
android:background="#FFFFFF"
android:clickable="true"
android:onClick="onAnimalClicked" >
<TextView
android:id="@+id/animal_textview"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_centerHorizontal="true"
android:drawableLeft="@drawable/animal_button"
android:drawablePadding="5dp"
android:gravity="center_vertical"
android:text="Add to Animals"
android:textColor="#258BE2"
android:textStyle="bold" />
</RelativeLayout>