问题
I am using a twolinelistitem for displaying two lines in each list item - Name and Summary. The Summary is a little big to fit in one line, thus when i display on screen, the summary gets cut and doesnt look good. What is the way to make sure the that the whole summary is visible in the list item?
here's the code -
<TwoLineListItem android:paddingTop="2dip"
android:paddingBottom="2dip"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:mode="twoLine">
<TextView android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@android:id/text1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="27dip"
android:layout_marginTop="6dip"
android:textColor="#474747"
/>
<TextView android:textAppearance="?android:attr/textAppearanceSmall"
android:id="@android:id/text2"
android:layout_width="fill_parent"
android:textColor="#00CDCD"
android:layout_height="wrap_content"
android:layout_below="@android:id/text1"
android:layout_alignLeft="@android:id/text1">
</TextView>
</TwoLineListItem>
来源:https://stackoverflow.com/questions/7426498/android-twolinelistitem-text-alignment