android:layout_alignBaseline vs android:layout_alignBottom 'Baseline', a typograpical term, is the line upon which most letters 'sit' and below which descenders extend. The beauty of using alignBaseline becomes apparent when considering the example of aligning two TextViews...Read more...Tags : alignbaseline, ...

Android Snippets - Align Baseline explained

When aligning TextViews in a Layout you may find android:layout_alignBaseline a useful formatting tool.

'Baseline' is a typograpical term and refers to the line upon which most letters 'sit' and below which descenders 'extend'.

Consider the example where we have two TextViews to present, the first of which has had android:padding="10dp" applied. If we were to try and use android:layout_alignBottom we would find the TextViews appear uneven due to the applied padding.

However, if we use android:layout_alignBaseline instead, the two TextViews appears beautifully aligned - nice!