iapp如何制作d窗公告

iapp如何制作d窗公告,第1张

【教程iapp】通知栏制作教程①

+关注学渣,1级 楼主

发表于2018-10-153476次阅读 玩机美化 〉

小白易学

超级简单

教程开始!

首先需要准备的工具:iapp(别问我为什么需要这个,我也不知道)

功能简介:每次进入软件都会跳出通知栏提醒用户!

s id = 2977

//通知id,很重要,如果不懂不要删除!

cls("android.app.Notification$Builder",通知类)

java(通知管理器,activity,"android.content.Context.getSystemService","String","notification")

javanew(通知,通知类,"Context",activity)

javax(通知,通知,通知类,"setSmallIcon","int",17301651)

//设置小图标(不设置大图就是大图标)

javax(通知,通知,通知类,"setContentTitle","CharSequence","iAPP通知栏")

//设置标题

javax(通知,通知,通知类,"setContentText","CharSequence","欢迎你的使用!希望本教程能给你带来帮助!")

//设置内容

javax(通知,通知,通知类,"setTicker","CharSequence","")

javax(通知,通知,通知类,"setAutoCancel","boolean",true)

javax(通知,通知,通知类,"setDefaults","int",-1)

//设置通知提示模式,-1所有都使用默认,1系统默认响铃,2系统默认震动,4系统默认闪光(部分手机不支持)

time(4,时间戳)

javax(通知,通知,通知类,"setWhen","long",时间戳)

javax(通知对象,通知,通知类,"build")

java(null,通知管理器,"android.app.NotificationManager.notify","int",id,"android.app.Notification",通知对象)

html><head><meta charset="utf-8"><title></title><style>.box{width:50%margin-top:10%margin:autopadding:28px height:350pxborder:1px #111 solid display:none /* 默认对话框隐藏 */}.box.show{display:block} .box .x{ font-size:18pxtext-align:rightdisplay:block}.box input{width:80%font-size:18pxmargin-top:18px}</style><script>野悄中 function change(n){document.getElementById('inputbox').style.display=n?'block':'none'/* 点击按钮打开/关闭 对话框 */} </script>运兆 </head><body><div id="div1"><input type="button" onClick="change(1)" value="修改"> <table> <tr> <td width="62"><a href="www.taobao.com" target="_blank">淘宝</a></td> <tr> <td><a href="www.taobao.com" target="_blank">淘宝</a></td> </tr> <tr> <td><a href="www.taobao.com" target="_blank">淘宝</a></td> </tr> </tr> </table></div><div id='inputbox' class="box"> <a class='x' href=''onclick="changereturn false">关闭</a> <p>新名称:</p><input type="text"> <p>新网址:</p><input type="text"颂山> <input type="button" value="确定"></div></body>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/bake/11992158.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-20
下一篇 2023-05-20

发表评论

登录后才能评论

评论列表(0条)

保存