我在一些字段上使用了android:inputType="textEmailAddress|textEmailSubject“,以防止在Stackoverflow上的帖子中出现长行换行的情况。然而,我只是注意到在我的Nexus-S (但不是三星Tab-2 7)上,一些文字是用红色下划线显示的。
例如,“18BR”包含未删除的BR。但是"NAS2“没有下划线。"TI“带下划线。如果我删除了android:inputType="textEmailAddress|textEmailSubject“,那么下划线就消失了,但是可以用长用户名换行。
<!-- Readout Waypoint Name -->
<TextView
android:inputType="textEmailAddress|textEmailSubject"
android:id="@+id/textWaypoint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="--"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="@dimen/menu" />解决这个问题的最好方法是什么?我在Google或Stackoverflow上什么也找不到,也不知道最好的解决方法是什么。
发布于 2012-11-13 15:08:28
删除android:inputType属性并使用TextView中的以下行来解决问题
android:ellipsize="end"
android:singleLine="true"https://stackoverflow.com/questions/13356615
复制相似问题