This API lets you provide a custom layout for the contentĪrea normally occupied by the title and text content, while still using systemĭecorations for the notification icon, timestamp, sub-text, and action buttons. NotificationCompat.DecoratedCustomViewStyle If you need a custom layout, you can apply Create custom layout for the content area On some versions, collapsed view layouts are limited to as little asĤ8 dp, heads-up view layouts are limited to as little as 88 dp, andĮxpanded view layouts are limited to as little as 252 dp. Height available for a custom notification layout depends on the Android Notifications because the space in the notification drawer is restricted. Your custom layout works with different device orientations and resolutions.Īlthough this advice applies to all UI layouts, it's especially important for Caution: When using a custom notification layout, take special care to ensure However, if the system templates don't meet your needs, you can use your own If you want to provide more content in your notification,Ĭonsider using one of the expandable notification To make your notifications look their best across different versions of Android,