安卓通知图标模板?

3

有没有关于如何在Android应用程序中设计好的图标放在状态栏作为通知的教程? 理想情况下,我正在寻找一个模板或者一个可以轻松修改的图标。我不是一位设计师。 我需要笑脸状态栏图标。

4个回答

5

3

1

看看Android 资源工作室吧!它是一个非常好用的工具,可以创建多个 Android 图标,包括通知图标。


0
Notification notification = new Notification(R.drawable.asterisk_sign, text, System.currentTimeMillis());
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0); //this is how we will launch an Activity when the user clicks the notification
notification.setLatestEventInfo(this, getText(R.string.app_name), text, contentIntent);
mNM.notify(R.string.minutemaid_service_started, notification);  //send the notification to the system, to be displayed in the notification bar

这是一个示例,演示如何在通知栏中创建一个通知,在选择后启动一个活动。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接