Is possible to create a notification with a transparent background in notification drawer?

1.3k Views Asked by At

I want to create a notification with a transparent background in the notification drawer transparent. Is it possible?

(Dibya wants to improve my statement,but I find it's not exactly what I need.

When using NotificationCompat.Builder to create a notification,I doubt whether I can set the background transparent in the notification drawer.Not just "make the notification's background in the notification drawer transparent",I know modify the system ui can solve it.)

2

There are 2 best solutions below

1
On

You can use a custom Notification layout to control how your notification appears.

I don't understand why you want to do this, though. Notifications appear in a system part of the UI, so there's never anything underneath them. If you're using "fullscreen", notifications don't appear.

1
On

AFAIK, no. You can set a custom drawable to be used as a notification background. You can, of course, use a fully transparent png, but it will still be just as transparent as the notification drawer itself.

The notification drawer and it's transparency is controlled by the SystemUI app, which is a system application and you can't modify it from another apk at runtime. Or you can download Android OS source code, modify the source code of SystemUI, recompile the whole OS, build a custom ROM image for your device and install it onto the device. If you want to experiment with custom ROMs and such, this forum post seems to be dealing with the same topic.