Aswan
Aswan

Reputation: 5135

notification service clear button disable in android

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

Upvotes: 1

Views: 1854

Answers (2)

Army
Army

Reputation: 11

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

Upvotes: 1

Nathan
Nathan

Reputation: 6225

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

Upvotes: 1

Related Questions