网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

Android应用中怎么实现通知栏闪动效果-创新互联

Android应用中怎么实现通知栏闪动效果?相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

成都创新互联专注于宁国网站建设服务及定制,我们拥有丰富的企业做网站经验。 热诚为您提供宁国营销型网站建设,宁国网站制作、宁国网页设计、宁国网站官网定制、微信小程序定制开发服务,打造宁国网络公司原创品牌,更为您提供宁国网站排名全网营销落地服务。

显示通知代码:

private void showNotification(Context ctx, String url) {
    Notification n = new Notification();
    n.flags |= Notification.FLAG_SHOW_LIGHTS;
    n.flags |= Notification.FLAG_AUTO_CANCEL;
    n.defaults = Notification.DEFAULT_SOUND;
    n.icon = R.drawable.ic_launcher;
    n.when = System.currentTimeMillis();
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.setClassName(ctx.getPackageName(), MainActivity.class.getName());
    PendingIntent pi = PendingIntent.getActivity(ctx, 0, intent, 0);
    n.setLatestEventInfo(ctx, "title", "summary", pi);
    NotificationManager manager = (NotificationManager) ctx.getSystemService(Context.NOTIFICATION_SERVICE);
    manager.notify(0, n);
}

名称栏目:Android应用中怎么实现通知栏闪动效果-创新互联
当前链接:http://bjjierui.cn/article/dsohpo.html

其他资讯