删除我的通知下的大应用程序图标?

Remove big app icon under my notification?

我通过 android 发出了通知,通知下方显示了我的应用程序图标,但我无法将其删除。如何做到这一点?

这是我的代码:

 public void MakeEventsNotification(int num){

    Intent myIntent = new Intent(this, BazardanApp.class);
    Bundle parcerable = new Bundle();
    parcerable.putChar("clicknotify", 'E');
    myIntent.putExtra("clicknotify", parcerable);
    PendingIntent myPendingIntent = PendingIntent.getActivity(this, 1, myIntent, 0);


    NotificationCompat.Builder builder  = new NotificationCompat.Builder(this)
            .setContentTitle("بازاردان")
            .setContentText("شما " + num + " رویداد جدید در بازاردان دارید ...")
            .setNumber(num)
            .setSmallIcon(R.drawable.iconminmin)
            .setLargeIcon(BitmapFactory.decodeResource(that.getResources(), R.drawable.iconmin))
            .setContentIntent(myPendingIntent)
            .setAutoCancel(true);
    Uri uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    builder.setSound(uri);
    long[] v = {500,1000};
    builder.setVibrate(v);

    Notification myNotification;
    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
         myNotification = builder.addAction(R.drawable.icon, "نمایش رویدادها", myPendingIntent).build();
    }else {
         myNotification = builder.getNotification();
    }
    NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

    notificationManager.notify(0, myNotification);


}

您已经使用了 setLargeIcon() 只需注释掉那一行就可以了

public void MakeEventsNotification(int num){

    Intent myIntent = new Intent(this, BazardanApp.class);
    Bundle parcerable = new Bundle();
    parcerable.putChar("clicknotify", 'E');
    myIntent.putExtra("clicknotify", parcerable);
    PendingIntent myPendingIntent = PendingIntent.getActivity(this, 1, myIntent, 0);


    NotificationCompat.Builder builder  = new NotificationCompat.Builder(this)
            .setContentTitle("بازاردان")
            .setContentText("شما " + num + " رویداد جدید در بازاردان دارید ...")
            .setNumber(num)
            .setSmallIcon(R.drawable.iconminmin)
            //.setLargeIcon(BitmapFactory.decodeResource(that.getResources(), R.drawable.iconmin))
            .setContentIntent(myPendingIntent)
            .setAutoCancel(true);
    Uri uri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
    builder.setSound(uri);
    long[] v = {500,1000};
    builder.setVibrate(v);

    Notification myNotification;
    if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
         myNotification = builder.addAction(R.drawable.icon, "نمایش رویدادها", myPendingIntent).build();
    }else {
         myNotification = builder.getNotification();
    }
    NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);

    notificationManager.notify(0, myNotification);
}

有关通知的更多信息,请参阅此 -> http://developer.android.com/guide/topics/ui/notifiers/notifications.html

还有这个-> http://developer.android.com/training/notify-user/build-notification.html