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

来源:互联网 发布:文思海辉3年java工资 编辑:程序博客网 时间:2024/06/05 18:18

在做一个关于手写识别汉字的程序时需要移植到手机上,首选的是windows操作系统的手机,因没有实体手机,就只在模拟器上实现了程序。笔者学的是C#,后来老师又让在android机上实现,期间遇到上述问题,现在把自己的解决方法贴下来,自己是看了博客园的一个人的设置解决的

<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属性时要注意,不然会出现省略号的情况。

 

原创粉丝点击