Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
170 views
in Technique[技术] by (71.8m points)

What are the sizes of the icons in Android notifications action-buttons?

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

Image from developer.android.com

question from:https://stackoverflow.com/questions/19454470/what-are-the-sizes-of-the-icons-in-android-notifications-action-buttons

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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.

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...