0

我有一个 TextView 用来向我的用户显示电子邮件地址

                <TextView 
                    android:id="@+id/profile_email"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:padding="6dip"
                    android:textColor="#000000"
                    android:maxLines="1"
                    android:ellipsize="end" />

我的问题是许多电子邮件地址在中间被截断,而不是在末尾有一个椭圆。这是一个例子:

如果我的电子邮件地址是

short.name@mydomain.com

一切正常。但是,如果我的电子邮件地址是

really.longfreakennameforanemailaddressandscreenisntwideenough@mydomain.com

唯一会显示的是

really.

有任何想法吗?

4

1 回答 1

0

作为一种解决方法,您可以使用:

android:scrollHorizontally="true"
于 2010-10-28T16:30:20.260 回答