Android通知操作按钮中的图标尺寸是多少? [英] What are the sizes of the icons in Android notifications action-buttons?

查看:186
本文介绍了Android通知操作按钮中的图标尺寸是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

In expandable Notifications: what dimensions (in dp) should the icons have? Like the Icons for Snooze and Email here:

推荐答案

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

So to clarify this, I found the following in the Javadoc within the Android support library:


在此通知中添加操作。操作通常由
作为与通知内容相邻的按钮显示。

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

每个动作都必须有一个图标(32dp square,并且匹配 Holo Dark
动作栏视觉
样式

a文本标签和
PendingIntent

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

其扩展形式最多可以显示3个操作,从
按照添加的顺序向左移动,右侧的操作将不会显示在
,但是,请确保
任何基本功能可能以其他方式被用户访问。

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主题),它是:

So these should be identical to your action bar icons (for the Holo Dark theme), which is:

资产大小:32dp x 32dp

光学方形:24dp x 24dp

颜色(启用):#FFFFFF 80%不透明度

颜色(禁用):#FFFFFF 30%不透明度

Asset Size: 32dp x 32dp
Optical Square: 24dp x 24dp
Color (Enabled): #FFFFFF 80% opacity
Color (Disabled): #FFFFFF 30% opacity

这篇关于Android通知操作按钮中的图标尺寸是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆