用textview控件来演示
<TextView
android:id="@+id/huodong_index_hequnhuodong_item_tv_tesexiangqing"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="3"
android:lineSpacingExtra="3dp" />
ps: 红色字代表文字过多只想显示多行多余的文字用省略号代替的方法,蓝色字代表调整行间距的属性
如果要让TextView只显示一行,多出部分用省略号代替的话非常容易,只需要为xml文件中的TextView控件添加android:singleLine="true"即可