`
shirlly
  • 浏览: 1626697 次
  • 性别: Icon_minigender_2
  • 来自: 福州
社区版块
存档分类
最新评论

【转】android中Textview如何限制在一行显示且多余字符自动截断

 
阅读更多
width属性必须要设才有作用:

<TextView android:layout_width="wrap_content" 

android:layout_height="wrap_content"

android:id="@+id/PopNameList"
android:singleLine="true"
android:ellipsize="end"

android:textStyle="bold" 
android:textSize="15sp"
android:width="120dp" />
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics