解决方案
检查android:maxLines="1"
,如果你想添加结束...
插件也android:ellipsize="end"
<TextView
android:id="@+id/name"
android:text="i want this to crop not wrap"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end" />
android:singleLine="true"
是在API级别3弃用。
其他提示
您正在寻找android:singleLine="true"
。
你结帐了吗 android:水平滚动. 。还有一个 水平滚动视图 如果那不起作用。
和在Java代码是:
textView.setSingleLine();
textView.setHorizontallyScrolling(true);
为我工作。
不隶属于 StackOverflow