开发者

android - TwoLineListItem text alignment

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 summa开发者_开发百科ry 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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜