如何更改通知栏按钮的背景图像,我想在一个按钮上播放/暂停,但我无法更改背景图像。
public static void setListeners(RemoteViews view, Context context) {
// Intent pause = new Intent(NOTIFY_PAUSE);
Intent play = new Intent(context, NotificationBroadcast.class);
PendingIntent pPlay = PendingIntent.getBroadcast(context, 0, play,
PendingIntent.FLAG_UPDATE_CURRENT);
view.setImageViewResource(R.id.buttonplay, R.drawable.play_button);
view.setOnClickPendingIntent(R.id.buttonplay, pPlay);
}