我想在我的开发应用程序的通知中放大图标。我已经完成了通知RemortView
崩溃,并扩大布局帮助this site。低头投手是我目前的通知状态。如何在android中的通知中放置扩展图标
我的代码如下:
NotificationCompat.Builder builder = new NotificationCompat.Builder(mContext);
builder.setContentIntent(intent);
builder.setTicker(mContext.getResources().getString(R.string.custom_notification));
builder.setSmallIcon(R.drawable.ic_notification_small_basket);
builder.setAutoCancel(true);
builder.setSound(RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION));
builder.setCustomBigContentView(expandedView);
builder.setCustomContentView(contentView);
NotificationManager notificationManager = (NotificationManager) mContext.getSystemService(NOTIFICATION_SERVICE);
notificationManager.notify(0, builder.build());
实际我需要的是如何将展开图标,以及如何获取使用展开和折叠通知一下,从通知RemortView
事件。
看起来像下面的投手。 这个投手只是一个扩展图标的例子。
一些调整,我会从这里开始https://developer.android.com /training/monitoring-device-state/battery-monitoring.html然后学习如何请求一个视图对象,当你点击一个按钮时搜索“android onClick get view”它可能会开启一个新的世界 – Grendel
嗨@Grendel,请看我的更新的问题。 –
这里是一个链接,可能会帮助http://programmerguru.com/android-tutorial/android-broadcast-receiver-example/ – Grendel