I have a horizontal LinearLayout
containing a TextView
followed by a Spinner
next to it. This LinearLayout
is dynamically
I've encountered the same cut-off issue as shown at the screenshot. It is caused by the baseline alignment in the horizontal LinearLayout
. TextView
and Spinner
have different baselines due to font size difference. To fix the issue it is needed to disable baseline alignment for the layout by setting:
android:baselineAligned="false"
or in the code:
layout.setBaselineAligned(false);