android - Android 通知操作按钮中的图标大小是多少?

标签 android notifications icons

在可展开通知中:图标应该有什么尺寸(以 dp 为单位)? 喜欢这里的贪睡和电子邮件图标:

Image from developer.android.com

最佳答案

为了澄清这一点,我在 Android 支持库的 Javadoc 中找到了以下内容:

Add an action to this notification. Actions are typically displayed by the system as a button adjacent to the notification content.

Every action must have an icon (32dp square and matching the Holo Dark action bar visual style, a textual label, and a PendingIntent.

A notification in its expanded form can display up to 3 actions, from left to right in the order they were added. Actions will not be displayed when the notification is collapsed, however, so be sure that any essential functions may be accessed by the user in some other way.

因此,这些应该与您的操作栏图标(对于 Holo Dark 主题)相同,即:

Assets 大小:32dp x 32dp
光学正方形:24dp x 24dp
颜色(已启用):#FFFFFF 80% 不透明度
颜色(禁用):#FFFFFF 30% 不透明度

关于android - Android 通知操作按钮中的图标大小是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19454470/

相关文章:

android - PhoneGap 或 native 应用程序开发

android - 滚动时具有 Horizo​​ntalScrollview 的 ScrollView 滞后

android - 谷歌服务 json 缺少 client_type 3

android - 是否可以从通知操作发送 LocalBroadcast?

icons - Sitecore IconCache 图像不显示,路径不正确

android - air for android 图标尺寸太小

android - WebView 上的 Espresso

ios - 第三方应用程序可以访问其他应用程序的通知吗?

c# - 以编程方式更改 WPF 中的按钮图标

java - 通知不可取消