什么是ellipsize android系统中是什么意思?系统、ellipsize、android

2023-09-12 21:56:52 作者:背着书包去打架

我添加了一个EditText到我的布局,并增加了一个提示,并使其水平居中。

I've added an EditText to my layout, and added a hint, and made it centered horizontally.

在运行应用程序,提示也看不见。我发现,我应该让ellipsizeTextView的价值是开始

When running the application, the hint was invisible. I found that I should make "ellipsize" value of the TextView to be "start"

<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的文档,我读:

In android documentation, I read:

如果设置,使单词超过视图长广被   ellipsized而不是在中间断裂。

If set, causes words that are longer than the view is wide to be ellipsized instead of broken in the middle.

的问题是,ellipsize没有在词典中找到。任何人都可以向我解释什么好处,我们可以通过ellipsize获得属性?什么是开始,结束,中等?

The problem is that "ellipsize" is not found in the dictionary. Can anybody explain to me what benefits we can gain by "ellipsize" attribute? and what is the difference between "start", "end", "middle"?

推荐答案

您可以找到文件的 此处 。

You can find documentation here.

根据您的需求您可以根据选项尝试。

Based on your requirement you can try according option.

为 ellipsize ,新词,是指使用缩短文字的省略号,即三个点 ... 或更常见的连字 ... ,以代替省略位。

to ellipsize, a neologism, means to shorten text using an ellipsis, i.e. three dots ... or more commonly ligature , to stand in for the omitted bits.

说原值PF文本视图是 aaabbbccc 及其视图内配合

Say original value pf text view is aaabbbccc and its fitting inside the view

启动的结果应该是: ... BCCC

结束的结果应该是: AAAB ...

的结果应该是: AA ... CC

字幕的结果应该是: aaabbbccc 自动从右滑动至左

marquee's output will be : aaabbbccc auto sliding from right to left