如果TextSize在android中更多,则放三个点

Ans*_*u P 1 xml android

在Android中,如果长度大于某个限制,我怎么能通过在文本末尾放三个点来限制TextView的宽度?

can*_*ova 10

将此代码放入TextView

android:ellipsize="end"
android:singleLine="true"   // if you want 3 dots for single line, add this.
android:maxLines="2" // if you want 3 dots after two lines, add this.
Run Code Online (Sandbox Code Playgroud)