什么是Android中的通知动作按钮图标的大小? [英] What are the sizes of the icons in Android notifications action-buttons?

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

问题描述

在扩展声明:应该的图标有什么尺寸(以DP)? 像图标贪睡和电子邮件here:

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

推荐答案

因此​​,为了澄清这一点,我发现在Android支持库中的Javadoc如下:

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广场和配套的全息暗   行动起来吧视觉   风格,   一个文本标签,和一个   <一href="http://developer.android.com/reference/android/app/PendingIntent.html"><$c$c>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.

所以这应该是相同的,以你的动作栏图标(在全息黑暗的主题),它是:

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天全站免登陆