android Textview 显示一行,且超出自动截断,显示"..."

android Textview 显示一行,且超出自动截断,显示"..."

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:singleLine="true"
    android:ellipsize="end"
    android:textSize="26px"
    android:width="400px"/>

以下显示两行,超出多余显示"..."

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:includeFontPadding="false"
    android:textSize="26px"
    android:maxLines="2"
    android:ellipsize="end"/>

猜你喜欢

转载自blog.csdn.net/xl_0102/article/details/80265596