Android 7自定义通知 - 如何显示应用名称和展开/折叠箭头

问题描述 投票:0回答:1

我的通知目前是一个完全自定义的布局,因为Spotify曾经是:

enter image description here

但我想显示应用程序图标,名称和展​​开/折叠箭头,就像现在的原生Android 7通知一样。你如何得到它来显示标题和展开/折叠箭头,正如Spotify现在做的那样?

enter image description here enter image description here

我假设它仍然是一个自定义布局。如果没有,您如何在原生布局上制作自定义按钮?我知道如何使用快速回复栏或inboxStyle,但那些不允许图标。

谢谢

android android-notifications android-7.0-nougat
1个回答
1
投票

这不是自定义通知 - 它是MediaStyle中解释的标准Using MediaStyle notifications guide通知。

如果您发现需要自定义通知,如果要保持DecoratedMediaCustomViewStyle通知中使用的图稿样式和自动调整大小,也可以使用MediaStyle

© www.soinside.com 2019 - 2024. All rights reserved.