设置Textview最大长度,超出显示省略号
16lz
2021-01-23
<TextView android:id="@+id/tvUserNameUgcListItem" android:layout_height="@dimen/dp45" android:layout_width="wrap_content" android:text="云不撸云不撸云不撸云不撸云不撸云不撸" android:textSize="@dimen/sp15" android:singleLine="true" android:layout_marginLeft="@dimen/dp10" android:maxEms="8" android:ellipsize="end" android:textColor="@color/white_wall" android:layout_toRightOf="@+id/ivUserImgUgcListItem" android:gravity="center_vertical" />
其中
android:singleLine="true"android:maxEms="8"android:ellipsize="end"
很关键
更多相关文章
- C# 5.0引入了两个关键字 --async和await
- 在C/C++中如何使用extern关键字
- C语言的关键字有哪些?
- c语言中的关键字有哪些类型?
- c语言关键字是什么
- c语言static关键字的作用是什么
- c语言的标识符允许使用关键字吗?
- c语言中的关键字有哪些?
- c++中static关键字的作用是什么?