我在我的布局中添加了一个EditText,并添加了一个提示,并使其水平居中。
在运行应用程序时,提示是不可见的。我发现我应该使椭圆值的TextView是开始:
<EditText
android:id="@+id/number1EditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="start"
android:ems="10"
android:gravity="center_horizontal"
android:hint="@string/hint1" />
在Android文档中,我读到:
如果设置,将导致比视图宽度更长的单词
椭圆形的,而不是中间破碎的。
问题是ellipsize在字典里找不到。谁能给我解释一下椭圆大小属性能给我们带来什么好处?开始,结束,中间的区别是什么?
文本:
This is my first android application and
I am trying to make a funny game,
It seems android is really very easy to play.
假设上面是你的文本,如果你使用ellipsize的start属性,它会像这样
This is my first android application and
...t seems android is really very easy to play.
带有end属性
This is my first android application and
I am trying to make a funny game,...
文本:
This is my first android application and
I am trying to make a funny game,
It seems android is really very easy to play.
假设上面是你的文本,如果你使用ellipsize的start属性,它会像这样
This is my first android application and
...t seems android is really very easy to play.
带有end属性
This is my first android application and
I am trying to make a funny game,...