更改通知布局我反編譯我的系統(tǒng)音樂應用程序(來自索尼愛立信Android版2.3.7),因為我想更改通知布局。我找到了使用此代碼創(chuàng)建通知的方法:private void sendStatusBarNotification(Track paramTrack){
if (paramTrack != null)
{
NotificationManager localNotificationManager = (NotificationManager)this.mContext.getSystemService("notification");
String str = paramTrack.getArtist();
if ((str == null) || (str.equals(this.mContext.getString(2131361954))))
str = this.mContext.getString(2131361798);
Notification localNotification = new Notification(2130837696, paramTrack.getTitle() + " - " + str, System.currentTimeMillis());
localNotification.flags = (0x2 | localNotification.flags);
localNotification.flags = (0x20 | localNotification.flags);
PendingIntent localPendingIntent = PendingIntent.getActivity(this.mContext, 0, new Intent(this.mContext, MusicActivity.class), 268435456);
localNotification.setLatestEventInfo(this.mContext, paramTrack.getTitle(), str, localPendingIntent);
localNotificationManager.notify(0, localNotification);
}}我現(xiàn)在的問題是:如何更改通知布局?我想構建一個看起來像原始Android通知布局但在通知右側有一個額外圖像的布局。我怎樣才能做到這一點?
更改通知布局
慕運維8079593
2019-07-30 14:37:14