本文介绍了Android的通知的高度和宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做,显示在通知栏自定义通知的应用程序,并想向用户展示他们的通知的preVIEW从创建通知的活动中。

I'm making an app that displays a custom notification in the notification bar, and would like to show the user a preview of their notification from inside the activity that creates the notification.

有没有通过Android API的方式来得到通知的像素,或的高度,这样我可以匹配的通知是什么样子尽可能准确尽可能?还是没有人知道通知的高度的Andr​​oid 3.0及更高版本?

Is there a way through the Android API to get the height in pixels, or dip of a notification, so that I can match what the notification would look like as accurately as possible? Or does anyone know the height of notifications in Android 3.0 and later?

推荐答案

默认通知栏的高度是38华电国际,在MDPI 25和19日在LDPI

the default notification bar height is 38 in hdpi, 25 in mdpi and 19 in ldpi

这篇关于Android的通知的高度和宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 22:14