android - Android:在状态栏中显示动画
问题描述
我想通过动画通知用户此服务正在状态栏中运行, 但无法显示动画或颜色
我看到了这些问题,但没有解决我的问题:
notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
Notification.Builder builder = new Notification.Builder(this);
builder.setAutoCancel(false);
builder.setContentTitle(getText(R.string.app_name_persian));
// builder.setContentText(getText(R.string.app_is_running));
builder.setSmallIcon(R.drawable.notification_animation);
builder.setOngoing(true);
builder.setWhen(System.currentTimeMillis());
notificationManager.notify(13, builder.build());
解决方案
推荐阅读
- azure - 获取 azure 管道的状态标志时,repoType 参数指的是什么
- android - 如何为特定的构建风格设置应用链接
- javascript - 方法 splice() et findindex() javascript问题搜索板
- javascript - 删除输入内容后,表单中的必填字段不会变为红色
- javascript - React Hook useEffect 缺少依赖项:'formData'。包括它或删除依赖数组。什么是依赖是使用
- flutter - 如何使用材质库进行小部件的导入建议?
- flutter - 如何修复抽屉颤动中未定义问题子项
- android - Android根据设备语言设置应用语言
- linux - 在给定时间内从用户那里读取输入,否则退出
- amazon-web-services - Hadoop s3 配置文件丢失