Reputation: 542
I created a custom notification with standard height (not the expanded version described with bigContentView) which works fine with Android 4 up to 6.
In Android 7 the design of the notifications was changed, the third line which used to be at the bottom is now at the top, and the notifications are higher than before. But for unknown reason my custom notification is not enlarged accordingly and now looks like a foreign object between the other notifications.
I am using android:layout_height="match_parent" and also experimented with fixed height, but without success.
Is there a way in Android 7 to let my notifications look great again, or is there a bug in that OS version?
The picture the link points to shows three notifications. The first and last ones are 99 pixels high, while my custom notification is 85 pixels high.
Upvotes: 2
Views: 781
Reputation: 866
I was having a problem with my notification layout on Android 7. Setting the parent with fixed height such as 64dp and having its childen's height set to match parent was resulting in a weird UI with empty spaces on the top and bottom. I resolved it by setting the children's height to 64dp instead of match_parent. Hope this helps.
Upvotes: 1