2012-02-15 94 views

回答

0

以及我想不通,你需要新的API爲Android 3.0以上版本的新通知,您可以設置任意繪製:)

Notification noti = new Notification.Builder(mContext) 
    .setContentTitle("New mail from " + sender.toString()) 
    .setContentText(subject) 
    .setSmallIcon(R.drawable.new_mail) 
    .setLargeIcon(aBitmap) 
    .build(); 
0
Notification notif = new Notification(R.drawable.stat_sample, tickerText, 
      System.currentTimeMillis()); 

其中R.drawable.stat_sample指向您的圖像。

此處瞭解詳情:http://developer.android.com/guide/topics/ui/notifiers/notifications.html

+0

但它與可繪製工作,如果我想要聯繫圖片會發生什麼?我有繪圖或位圖,但通知只接受int – Javier 2012-02-16 05:39:00

+0

int是可繪製的 – 2012-02-16 16:15:00

+0

的引用id是的,我知道但是如果我想使用聯繫人圖片會發生什麼?我不能有我的聯繫人圖片在我的「drawable」文件夾,所以我收到的聯繫人圖片與數據庫的查詢,所以它posible使用佔位符或東西? – Javier 2012-02-17 16:38:15

相關問題