通知内容标题被切断 [英] notification content title is cut off
问题描述
我从这个<一个明白href=\"http://eliasbland.word$p$pss.com/2011/03/11/an-example-of-how-to-run-a-background-task-and-report-progress-in-the-status-bar-using-asynctask-on-android/\"相对=nofollow>链接建立在Android状态栏上的通知。但是,如果我的内容标题太长,字将得到切断。可我知道如何启用通知的内容标题是反弹的效果?即:如果用户在通知抽屉和内容标题太长,就会慢慢滚动至背面自动,都在1线
I understand from this link to create a notification in the android status bar. However, if my content title is too long, the word will get cut off. May i know how to enable a "bouncing" effect in the content title of the notification? I.e: if the user is in the notification drawer and the content title is too long, it will slowly scroll to the back automatically, all in 1 line.
推荐答案
这已是股票行为的通知
。在查看
含有通知
标题和文本工具的android:ellipsize =金字招牌
,如果内容的宽度超过了查看
的宽度将因此滚动。仅在通知的重点是产生这种情况的。
This is already the stock behavior for a Notification
. The View
that holds the Notification
title and text implements android:ellipsize="marquee"
, and will therefore scroll if the width of the content exceeds the width of the View
. This effect only occurs if the Notification is focused.
这篇关于通知内容标题被切断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!