小编Adi*_*esh的帖子

如何将应用程序图标设置为通知抽屉中的通知图标

如图所示......
我收到了通知图标(左侧是红色).
但我需要显示黑色箭头所示的应用程序图标

在此输入图像描述

    public void notify(View view){
    notification.setSmallIcon(R.drawable.ic_stat_name);
    notification.setTicker("Welcome to ****");
    notification.setWhen(System.currentTimeMillis());
    notification.setContentTitle("abcd");
    notification.setContentText("abcd");


    Intent intent = new Intent(this, home.class);
    PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
    notification.setContentIntent(pendingIntent);


    NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    nm.notify(uniqueID, notification.build());
}
Run Code Online (Sandbox Code Playgroud)

notifications android android-notifications android-notification-bar android-studio

26
推荐指数
2
解决办法
6万
查看次数