Sunday, 11 August 2013

Android Button with longer text layout

Android Button with longer text layout

I want to have 2 buttons, equal size, with icons on them on the bottom of
my Activity layout. I drew them and everything, but now that I added the
icons, one button which has longer text and needs to be written on two
lines, insists on being shown 3-5 pixels lower than the other one. Here is
my code:
<LinearLayout
android:id="@+id/Buttonz"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:baselineAligned="true"
android:paddingTop="30dp" >
<Button
android:id="@+id/btn_confirm"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.50"
android:drawableLeft="@drawable/save36"
android:text="@string/btn_lbl_confirm" />
<Button
android:id="@+id/btn_cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="0.50"
android:drawableLeft="@drawable/back36"
android:text="@string/btn_lbl_cancel" />
</LinearLayout>
What am I doing wrong?

No comments:

Post a Comment