【发布时间】:2019-06-25 07:44:59
【问题描述】:
我有以下TextView
<TextView
android:id="@+id/textView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:maxLines="3"
android:text="Large text"
android:ellipsize="end" />
当我打电话给textView.getLineCount() 时,我总是得到3。但我想获得隐藏的“实际行数”,因为我使用的是maxLines。我该怎么做?
【问题讨论】: