android中的textview显示汉字不能自动换行的一个解决办法

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
 
    android:shrinkColumns="0"
    >

  
       <TableRow
           android:layout_width="match_parent"
           android:layout_height="wrap_content">
           <TextView
               android:id="@+id/txtzi"
               android:textSize="20sp"/>
       </TableRow>
  ...   


</TableLayout>

textview里面设置ellipsize属性和singline属性时要注意,不然会出现省略号的情况。(在table的格子中不能自动换行)

 

posted @ 2014-12-27 09:05  星辰之力  阅读(1648)  评论(0编辑  收藏  举报