对于长内容,是否可以在第一行中添加3个点而不是最后一行?

发布于 2025-02-10 15:17:03 字数 703 浏览 0 评论 0原文

<com.google.android.material.textview.MaterialTextView
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:ellipsize="end"
    android:maxLines="2"
    android:text="734,324\nCoins"/>

Looks like this
⇩ ⇩ ⇩
734,324
Coins

<com.google.android.material.textview.MaterialTextView
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:ellipsize="end"
    android:maxLines="2"
    android:text="183,238,928,819,348,184\nCoins"/>

Looks like this
⇩ ⇩ ⇩
183,238,928,819,
348,184...

I want it to be like this
⇩ ⇩ ⇩
183,238,928,819,34...
Coins

我想要在长期添加一行中的硬币数量时,并将硬币单词保存在第二行中。

<com.google.android.material.textview.MaterialTextView
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:ellipsize="end"
    android:maxLines="2"
    android:text="734,324\nCoins"/>

Looks like this
⇩ ⇩ ⇩
734,324
Coins

<com.google.android.material.textview.MaterialTextView
    android:layout_width="0dp"
    android:layout_height="wrap_content"
    android:ellipsize="end"
    android:maxLines="2"
    android:text="183,238,928,819,348,184\nCoins"/>

Looks like this
⇩ ⇩ ⇩
183,238,928,819,
348,184...

I want it to be like this
⇩ ⇩ ⇩
183,238,928,819,34...
Coins

I want when the number of coins is long add 3 dots in the first line and keep coins word in the second line.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文