这对我有用:
android:layout_width="80px"
android:layout_height="wrap_content"
android:text="Some text"
android:background="#88ff0000"
android:singleLine="true"
android:ellipsize="marquee"/>
或者最后用“……”:
android:layout_width="80px"
android:layout_height="wrap_content"
android:text="Some text"
android:background="#88ff0000"
android:singleLine="true"
/>
虽然使用android:行不起作用:
android:layout_width="80px"
android:layout_height="wrap_content"
android:text="Some text"
android:background="#88ff0000"
android:lines="1"
android:ellipsize="marquee"/>
这很可能是一个错误,我相信我已经看到了一些错误报告.