android中的椭圆是什么意思? [英] What does ellipsize mean in android?

查看:36
本文介绍了android中的椭圆是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

运行应用程序时,提示不可见.我发现我应该将 TextViewellipsize 值设为 start:

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:

如果设置,导致长于视图宽度的词
椭圆形而不是中间断了.

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

问题是在字典中找不到ellipsize.谁能向我解释我们可以通过 ellipsize 属性获得哪些好处?而startendmiddle有什么区别?

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.

to ellipsize,一个新词,意思是使用省略号来缩短文本a>,即三个点 ... 或更常见的连字 ...,代表省略的位.

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

start 的输出将是:...bccc

end 的输出将是:aaab...

middle 的输出将是:aa...cc

marquee 的输出将是:aaabbbccc 从右向左自动滑动

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

这篇关于android中的椭圆是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆