谢谢.
编辑:由于评论指出bigContentView,将其标记为已回答
解决方法 你似乎已经知道了…你可能正在谈论大视图风格的通知.谷歌有 specific training documentation以及 a technical guide.这是一些示例代码:// Constructs the Builder object.NotificationCompat.Builder builder = new NotificationCompat.Builder(this) .setSmallicon(R.drawable.ic_stat_notification) .setContentTitle(getString(R.string.notification)) .setContentText(getString(R.string.Ping)) .setDefaults(Notification.DEFAulT_ALL) // requires VIBRATE permission /* * Sets the big vIEw "big text" style and supplIEs the * text (the user's reminder message) that will be displayed * in the detail area of the expanded notification. * These calls are ignored by the support library for * pre-4.1 devices. */ .setStyle(new NotificationCompat.BigTextStyle() .bigText(msg)) .addAction (R.drawable.ic_stat_dismiss,getString(R.string.dismiss),pidismiss) .addAction (R.drawable.ic_stat_snooze,getString(R.string.snooze),piSnooze);
注意对setStyle的调用.
总结以上是内存溢出为你收集整理的android – 自定义通知最大高度?全部内容,希望文章能够帮你解决android – 自定义通知最大高度?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)