小编jav*_*tti的帖子

Android 单挑通知在几秒钟后消失

我希望通知不会在几秒钟后消失。所以我创建了这样的通知:

  NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
        builder.setSmallIcon(R.drawable.cast_ic_notification_small_icon)
                .setDefaults(Notification.FLAG_ONGOING_EVENT)
                .setPriority(Notification.PRIORITY_HIGH)
                .setContentTitle(notificationDetails.getSubject())
                .setContentText(notificationDetails.getMessage())
                .setColor(context.getResources().getColor(R.color.colorPrimary))
                .setOngoing(true);
Run Code Online (Sandbox Code Playgroud)

并设置 FLAG_ONGOING_EVENT 和方法 setOngoing(true)。

但几秒钟后,通知继续消失。我希望通知仅在用户单击时消失。谢谢你。

notifications android heads-up-notifications

4
推荐指数
3
解决办法
3034
查看次数

在Windows中为paperclip gem安装ImageMagick

我按照本指南使用回形针http://railscasts.com/episodes/134-paperclip?language=en&view=asciicast 一切都好,但请注意,要启用调整大小,您需要在服务器上安装ImageMagick.

那么我应该如何安装ImageMagick?我有WINDOWS 8并在网站http://www.imagemagick.org/下载不起作用!!!!

windows upload imagemagick paperclip

2
推荐指数
1
解决办法
3422
查看次数