"dp" instead of "sp" made no difference. The two buttons still appear at different vertical positions when only one of them has text that takes up two lines.
On Wednesday, June 25, 2014 9:54:03 AM UTC-6, Tushar Lal wrote: > > Instead of "sp" try "dp"... > On Jun 25, 2014 7:06 PM, "'RLScott' via Android Developers" < > [email protected] <javascript:>> wrote: > >> Two buttons are to be placed side by side in a horizonally-oriented >> LinearLayout whose width is match_parent. To make the buttons share the >> width equally I have assigned each Button the layout_weight of "0.5". >> Everything looks good if both buttons have a single line of text, or if >> both buttons have two lines of text. But when one button has 2 lines and >> the other button has 1 line, the two buttons appear at slightly different >> vertical positions. They both have a fixed height ("60sp") to allow for 1 >> or 2 lines of text. How can I make these buttons look symmetrical? Here >> is the xml: >> >> <LinearLayout >> android:layout_width="match_parent" >> android:layout_height="wrap_content" > >> >> <Button >> android:layout_height="60sp" >> android:layout_weight="0.5" >> android:text="Cancel the Calibration" >> android:textSize="18sp" ></Button> >> >> <Button >> android:layout_height="60sp" >> android:layout_weight="0.5" >> android:text="Accept" >> android:textSize="18sp" ></Button> >> >> </LinearLayout> >> >> This is being rendered on a 320x480 portrait screen under Android 3.1. >> Why don't they appear at the same vertical position on the screen? >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> <javascript:> >> To unsubscribe from this group, send email to >> [email protected] <javascript:> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Android Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

