- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我创建了一个通知
NotificationCompat.InboxStyle
并使用
添加文本inboxStyle.addLine
用于多条短信。但是,当我添加
Notification.BigTextStyle
在通知中,BigTextStyle
不工作,因为通知已经 setStyle
。
我的通知是;
Notification summaryNotification = new
NotificationCompat.Builder(this, notificationChannelId)
.setContentTitle("title")
.setStyle(addInboxStyle())
.setStyle(addBigTextStyle())
.setGroupSummary(true)
.setContentIntent(pendingIntent)
.setChannelId(notificationChannelId)
.build();
最佳答案
不,这是不可能的但是您可以使用 MessagingStyle 通知获得类似的行为,您可以在不扩展和扩展通知的情况下使用大消息,并且您还可以在通知中包含多行
https://developer.android.com/reference/android/app/Notification.MessagingStyle
NotificationCompat.MessagingStyle.Message message1 =
new NotificationCompat.MessagingStyle.Message(messages[0].getText(),
messages[0].getTime(),
messages[0].getSender());
NotificationCompat.MessagingStyle.Message message2 =
new NotificationCompat.MessagingStyle.Message(messages[1].getText(),
messages[1].getTime(),
messages[1].getSender());
Notification notification = new NotificationCompat.Builder(context, CHANNEL_ID)
.setSmallIcon(R.drawable.new_message)
.setStyle(new NotificationCompat.MessagingStyle(resources.getString(R.string.reply_name))
.addMessage(message1)
.addMessage(message2))
.build();
关于android - 是否可以在同一通知中同时使用 InboxStyle 和 BigText,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50639666/
我正在尝试在动态容器上实现bigtext。我让它可以很好地与 fittext 配合使用,但我更喜欢调整 bigtext 的大小。 有人知道如何防止文本与bigtext重叠吗? 这是 HTML 测试代码
我正在尝试让 Bigtext JQuery 插件以预期的方式运行。如果我们取 this fiddle例如,我希望文本和标题的字体大小能够根据容器中的文本量进行调整。 我尝试了 this SO post
我创建了一个通知 NotificationCompat.InboxStyle 并使用添加文本 inboxStyle.addLine 用于多条短信。但是,当我添加 Notification.BigTex
我有这个简单的 html 片段 The elusive BIGTEXT plugin exclusively captured on film 没有启用 CSS,所
我正在使用 BigText插件,我有一个小问题。我希望清楚: 在空中设置的 div 的文本在调整窗口大小之前不适合... This fiddle不言而喻。 JS $(document).ready(f
我一直在使用以下 jquery 插件根据容器 div 的宽度设置字体大小:http://www.zachleat.com/web/bigtext-makes-text-big/当我将 css 中的字体
尝试在 ListBox 顶部添加 BigText 时,我不断收到错误 AttributeError: 'BigText' object has no attribute 'rows'。我知道 BigT
我是一名优秀的程序员,十分优秀!