I have a couple of TextViews in my app, which should have exactly 3 lines. This works on Android 3+, but on Android 2.3, which I'd also like to support, these fields have exactly 2 lines. I've also tried TextView.setLines(3); in code, but that does not seem to help. This is my TextView:
<TextView
d1p1:lines="3"
d1p1:maxLines="3"
d1p1:minLines="3"
d1p1:ellipsize="end"
d1p1:text="Some Text"
d1p1:textAppearance="?android:attr/textAppearanceMedium"
d1p1:layout_width="fill_parent"
d1p1:layout_height="55dp"
d1p1:id="@+id/detailsTextView"
d1p1:layout_below="@+id/locationTextView"
d1p1:textSize="13dp"
d1p1:textColor="@color/app_darkgray"
d1p1:background="@color/app_dark_background"
d1p1:layout_marginLeft="@dimen/sr_horizontal_padding"
d1p1:layout_marginRight="@dimen/sr_horizontal_padding" />
Setting the height to wrap_content also does not work.