Skip to content

Commit 142617d

Browse files
minaripenguinaswin7469
authored andcommitted
core: Optimize notification scaling/rendering
* attempt to reduce qs jittering/jank * downscale icon/bitmap dimensions * tune notification text dimensions for UX and scaling performance Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com> core: Downscale more notification bitmap dimensions * measurements were based from RUI 4.0 notification bitmap measurements (approx) Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com>
1 parent 6b67967 commit 142617d

1 file changed

Lines changed: 29 additions & 29 deletions

File tree

core/res/res/values/dimens.xml

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
-->
2020
<resources>
2121
<!-- The width that is used when creating thumbnails of applications. -->
22-
<dimen name="thumbnail_width">192dp</dimen>
22+
<dimen name="thumbnail_width">169dp</dimen>
2323
<!-- The height that is used when creating thumbnails of applications. -->
24-
<dimen name="thumbnail_height">192dp</dimen>
24+
<dimen name="thumbnail_height">169dp</dimen>
2525
<!-- The amount to scale a fullscreen screenshot thumbnail. -->
2626
<item name="thumbnail_fullscreen_scale" type="fraction">60%</item>
2727
<!-- The width used to calculate scale for full screen thumbnail on TV -->
@@ -276,10 +276,10 @@
276276
<dimen name="call_notification_system_action_min_width">100dp</dimen>
277277

278278
<!-- The size of icons for visual actions in the notification_material_action_list -->
279-
<dimen name="notification_actions_icon_size">56dp</dimen>
279+
<dimen name="notification_actions_icon_size">48dp</dimen>
280280

281281
<!-- The size of icons for visual actions in the notification_material_action_list -->
282-
<dimen name="notification_actions_icon_drawable_size">20dp</dimen>
282+
<dimen name="notification_actions_icon_drawable_size">18dp</dimen>
283283

284284
<!-- The corner radius if the emphasized action buttons in a notification -->
285285
<dimen name="notification_action_button_radius">18dp</dimen>
@@ -321,10 +321,10 @@
321321
<dimen name="notification_header_icon_size">18dp</dimen>
322322

323323
<!-- size (width and height) of the circle around the icon in the notification header -->
324-
<dimen name="notification_icon_circle_size">24dp</dimen>
324+
<dimen name="notification_icon_circle_size">20dp</dimen>
325325

326326
<!-- padding between the notification icon and the circle containing it -->
327-
<dimen name="notification_icon_circle_padding">4dp</dimen>
327+
<dimen name="notification_icon_circle_padding">0dp</dimen>
328328

329329
<!-- start margin of the icon circle in the notification view -->
330330
<dimen name="notification_icon_circle_start">16dp</dimen>
@@ -342,10 +342,10 @@
342342
<dimen name="notification_conversation_header_separating_margin">4dp</dimen>
343343

344344
<!-- The absolute size of the notification expand icon. -->
345-
<dimen name="notification_header_expand_icon_size">56dp</dimen>
345+
<dimen name="notification_header_expand_icon_size">48dp</dimen>
346346

347347
<!-- the height of the expand button pill -->
348-
<dimen name="notification_expand_button_pill_height">24dp</dimen>
348+
<dimen name="notification_expand_button_pill_height">20dp</dimen>
349349

350350
<!-- Vertical margin for the headerless notification content, when content has 1 line -->
351351
<!-- 16 * 2 (margins) + 24 (1 line) = 56 (notification) -->
@@ -365,10 +365,10 @@
365365
<dimen name="notification_min_height">88dp</dimen>
366366

367367
<!-- The width of the big icons in notifications. -->
368-
<dimen name="notification_large_icon_width">64dp</dimen>
368+
<dimen name="notification_large_icon_width">36dp</dimen>
369369

370370
<!-- The width of the big icons in notifications. -->
371-
<dimen name="notification_large_icon_height">64dp</dimen>
371+
<dimen name="notification_large_icon_height">36dp</dimen>
372372

373373
<!-- The minimum width of the app name in the header if it shrinks -->
374374
<dimen name="notification_header_shrink_min_width">72dp</dimen>
@@ -377,13 +377,13 @@
377377
<dimen name="notification_header_shrink_hide_width">24sp</dimen>
378378

379379
<!-- The size of the media actions in the media notification. -->
380-
<dimen name="media_notification_action_button_size">48dp</dimen>
380+
<dimen name="media_notification_action_button_size">42dp</dimen>
381381

382382
<!-- The bottom padding for the media actions container. -->
383383
<dimen name="media_notification_actions_padding_bottom">12dp</dimen>
384384

385385
<!-- The maximum size of the image in the expanded media notification -->
386-
<dimen name="media_notification_expanded_image_max_size">94dp</dimen>
386+
<dimen name="media_notification_expanded_image_max_size">90dp</dimen>
387387

388388
<!-- The maximum size of the image in the expanded media notification -->
389389
<dimen name="media_notification_expanded_image_margin_bottom">20dp</dimen>
@@ -407,7 +407,7 @@
407407
<dimen name="messaging_image_min_size">44dp</dimen>
408408

409409
<!-- The maximum size for any image in messaging style in order to be displayed -->
410-
<dimen name="messaging_image_max_height">136dp</dimen>
410+
<dimen name="messaging_image_max_height">132dp</dimen>
411411

412412
<!-- Extra spacing before and after images in messaging style -->
413413
<dimen name="messaging_image_extra_spacing">8dp</dimen>
@@ -622,7 +622,7 @@
622622
<dimen name="keyguard_avatar_frame_shadow_radius">1dp</dimen>
623623

624624
<!-- Size of the avator on hte multiuser lockscreen. -->
625-
<dimen name="keyguard_avatar_size">66dp</dimen>
625+
<dimen name="keyguard_avatar_size">64dp</dimen>
626626

627627
<!-- Size of the text under the avator on the multiuser lockscreen. -->
628628
<dimen name="keyguard_avatar_name_size">10sp</dimen>
@@ -758,17 +758,17 @@
758758
<dimen name="item_touch_helper_swipe_escape_max_velocity">800dp</dimen>
759759

760760
<!-- The maximum size of the small notification icon. -->
761-
<dimen name="notification_small_icon_size">48dp</dimen>
761+
<dimen name="notification_small_icon_size">36dp</dimen>
762762
<!-- The maximum height of any image in a remote view. This is applied to all images in custom remoteviews. This value is determined by the maximum notification height -->
763-
<dimen name="notification_custom_view_max_image_height">284dp</dimen>
763+
<dimen name="notification_custom_view_max_image_height">250dp</dimen>
764764
<!-- The maximum height of any image in a remote view. This is applied to all images in custom remoteviews. This value is determined a maximum notification width -->
765-
<dimen name="notification_custom_view_max_image_width">450dp</dimen>
765+
<dimen name="notification_custom_view_max_image_width">396dp</dimen>
766766
<!-- The maximum height of a big picture in a notification. The images will be reduced to that height in case they are bigger. This value is determined by the maximum notification height -->
767-
<dimen name="notification_big_picture_max_height">284dp</dimen>
767+
<dimen name="notification_big_picture_max_height">250dp</dimen>
768768
<!-- The maximum width of a big picture in a notification. The images will be reduced to that width in case they are bigger. This value is determined by the standard panel size -->
769-
<dimen name="notification_big_picture_max_width">416dp</dimen>
769+
<dimen name="notification_big_picture_max_width">366dp</dimen>
770770
<!-- The size of the right icon -->
771-
<dimen name="notification_right_icon_size">48dp</dimen>
771+
<dimen name="notification_right_icon_size">36dp</dimen>
772772
<!-- The margin between the right icon and the content. -->
773773
<dimen name="notification_right_icon_content_margin">12dp</dimen>
774774
<!-- The top and bottom margin of the right icon in the normal notification states -->
@@ -785,29 +785,29 @@
785785
<!-- The maximum size of Person avatar image in MessagingStyle notifications.
786786
This is bigger than displayed because listeners can use it for other displays
787787
e.g. wearables. -->
788-
<dimen name="notification_person_icon_max_size">144dp</dimen>
788+
<dimen name="notification_person_icon_max_size">120dp</dimen>
789789

790790
<!-- The maximum size of the small notification icon on low memory devices. -->
791791
<dimen name="notification_small_icon_size_low_ram">@dimen/notification_small_icon_size</dimen>
792792
<!-- The maximum height of any image in a remote view. This is applied to all images in custom remoteviews. -->
793-
<dimen name="notification_custom_view_max_image_height_low_ram">208dp</dimen>
793+
<dimen name="notification_custom_view_max_image_height_low_ram">184dp</dimen>
794794
<!-- The maximum height of any image in a remote view. This is applied to all images in custom remoteviews. -->
795-
<dimen name="notification_custom_view_max_image_width_low_ram">294dp</dimen>
795+
<dimen name="notification_custom_view_max_image_width_low_ram">259dp</dimen>
796796
<!-- The maximum height of a big picture in a notification. The images will be reduced to that height in case they are bigger. -->
797-
<dimen name="notification_big_picture_max_height_low_ram">208dp</dimen>
797+
<dimen name="notification_big_picture_max_height_low_ram">184dp</dimen>
798798
<!-- The maximum width of a big picture in a notification. The images will be reduced to that width in case they are bigger. -->
799-
<dimen name="notification_big_picture_max_width_low_ram">294dp</dimen>
799+
<dimen name="notification_big_picture_max_width_low_ram">259dp</dimen>
800800
<!-- The size of the right icon image when on low ram -->
801801
<dimen name="notification_right_icon_size_low_ram">@dimen/notification_right_icon_size</dimen>
802802
<!-- The maximum size of Person avatar image in MessagingStyle notifications.
803803
This is bigger than displayed because listeners can use it for other displays
804804
e.g. wearables. -->
805-
<dimen name="notification_person_icon_max_size_low_ram">96dp</dimen>
805+
<dimen name="notification_person_icon_max_size_low_ram">80dp</dimen>
806806
<!-- The maximum size of the grayscale icon -->
807-
<dimen name="notification_grayscale_icon_max_size">256dp</dimen>
807+
<dimen name="notification_grayscale_icon_max_size">225dp</dimen>
808808

809-
<dimen name="messaging_avatar_size">48dp</dimen>
810-
<dimen name="conversation_avatar_size">48dp</dimen>
809+
<dimen name="messaging_avatar_size">36dp</dimen>
810+
<dimen name="conversation_avatar_size">36dp</dimen>
811811
<!-- start margin of the icon circle in the conversation's skin of the header -->
812812
<dimen name="conversation_icon_circle_start">28dp</dimen>
813813
<!-- Start of the content in the conversation template -->

0 commit comments

Comments
 (0)