开发者

notification service clear button disable in android

开发者 https://www.devze.com 2022-12-21 21:47 出处:网络
when i run my application i am running one notification service .how i disable clear notification service button in my application only i need to run the service when my application is running开发者_如

when i run my application i am running one notification service .how i disable clear notification service button in my application only i need to run the service when my application is running开发者_如何转开发 .is there any way to disable the clear notification button .please

help me

Thanks

Aswan


The Button class inherits the setClickable(boolean) method from View. if you set it to false, the Button will be disabled.


It's simple, just add FLAG_NO_CLEAR flags to your notification object. notification.flags = Notification.FLAG_NO_CLEAR;

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号