我已经看到了这一个很多类似的问题,但我认为这仍然涵盖了新的天地:
1)提示文本消失,当你设置重力
2)android:ellipsize="start"
修复了,所以你可以都集中提示并居中文本
3)为什么下面的代码仍然显示中心提示文本?的EditText暗示与重力
<EditText
android:id="@+id/details"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:hint="use this area to provide specific identification information including approximate size, vessel name and registration numbers if available"
android:background="@android:drawable/editbox_background"
android:layout_below="@id/details_title"
/>
是因为fill_parent而不是wrap_content?我想也许是因为这个提示是多行的,但我缩短了它,它仍然出现并被集中。这些是我和其他EditTexts之间唯一的区别,需要android:ellipsize="start"
才能正确显示。这只是一个错误?
恼人的错误。这里是[解决] [1]: [1]:http://stackoverflow.com/questions/4649183/hint-and-textview-with-right-gravity-and-a-singleline/5957692#5957692 – 2011-07-14 15:53:55
hrm生病必须检查出来。 – 2011-10-21 15:01:04