{"id":207076,"date":"2024-02-23T05:00:43","date_gmt":"2024-02-23T05:00:43","guid":{"rendered":"https:\/\/michigandigitalnews.com\/index.php\/2024\/02\/23\/whats-new-in-the-jetpack-compose-january-24-release\/"},"modified":"2025-06-25T17:21:43","modified_gmt":"2025-06-25T17:21:43","slug":"whats-new-in-the-jetpack-compose-january-24-release","status":"publish","type":"post","link":"https:\/\/michigandigitalnews.com\/index.php\/2024\/02\/23\/whats-new-in-the-jetpack-compose-january-24-release\/","title":{"rendered":"What\u2019s new in the Jetpack Compose January \u201924 release"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div>\n<meta content=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh-sgaGzqJRAKlh8sK-7EWuecz5XrF8xLEt8iO9WKIFtWU2A8ExBX8L2cfdMDVwUOLEksbK1CZEH6XxXYUCKSE_LMK2T_M3VgViAQNzmgImLwjzQmeN4X9YqBqzsAV_IaiGedzOvySLGAmob66cCd5udbIV44-Py9GTHlZbJlFOD4QhY3pmjypddw8_5Jo\/s1600\/Social%20-%20Android%20-%20Jetpack%20Compose%20January%20%E2%80%9924.png\" name=\"twitter:image\"\/><br \/>\n<img decoding=\"async\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEh-sgaGzqJRAKlh8sK-7EWuecz5XrF8xLEt8iO9WKIFtWU2A8ExBX8L2cfdMDVwUOLEksbK1CZEH6XxXYUCKSE_LMK2T_M3VgViAQNzmgImLwjzQmeN4X9YqBqzsAV_IaiGedzOvySLGAmob66cCd5udbIV44-Py9GTHlZbJlFOD4QhY3pmjypddw8_5Jo\/s1600\/Social%20-%20Android%20-%20Jetpack%20Compose%20January%20%E2%80%9924.png\" style=\"display: none;\"\/><\/p>\n<p><em>Posted by <a href=\"https:\/\/twitter.com\/bentrengrove\" target=\"_blank\" rel=\"noopener\">Ben Trengrove<\/a>, Android Developer Relations Engineer<\/em><\/p>\n<p><a href=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgsWOsYH-CFQ6aJ5erNZvo0gEXZx1pMDDT9HoKtam9wBAfMC5ZPxt1DYn_VSjqAN1PMMNnVwueLDXV_v4ByjN1rjvDHeRyuJn95up0tFNuCIzbENjbvqbOVz3I1Iy7aVTzlOLtSAnADNutrwrTrzAcDOU-aadSvd15QXbjapcJpQF-_p-jKc13NMuqHBzQ\/s1600\/Header%20-%20Android%20-%20Jetpack%20Compose%20January%20%E2%80%9924.png\"><img decoding=\"async\" border=\"0\" data-original-height=\"800\" data-original-width=\"100%\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEgsWOsYH-CFQ6aJ5erNZvo0gEXZx1pMDDT9HoKtam9wBAfMC5ZPxt1DYn_VSjqAN1PMMNnVwueLDXV_v4ByjN1rjvDHeRyuJn95up0tFNuCIzbENjbvqbOVz3I1Iy7aVTzlOLtSAnADNutrwrTrzAcDOU-aadSvd15QXbjapcJpQF-_p-jKc13NMuqHBzQ\/s1600\/Header%20-%20Android%20-%20Jetpack%20Compose%20January%20%E2%80%9924.png\"\/><\/a><\/p>\n<p>Today, as part of the <a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/releases\/compose\" target=\"_blank\" rel=\"noopener\">Compose January \u201824 Bill of Materials<\/a>, we\u2019re releasing version 1.6 of <a href=\"https:\/\/d.android.com\/compose\" target=\"_blank\" rel=\"noopener\">Jetpack Compose<\/a>, Android&#8217;s modern, native UI toolkit that is <a href=\"https:\/\/developer.android.com\/jetpack\/compose#apps-built-with-compose\" target=\"_blank\" rel=\"noopener\">used by apps<\/a> such as <a href=\"https:\/\/android-developers.googleblog.com\/2023\/10\/meta-built-threads-in-only-5-months-using-jetpack-compose.html\" target=\"_blank\" rel=\"noopener\">Threads<\/a>, <a href=\"https:\/\/www.youtube.com\/watch?v=Hb5vWCwPmfE&amp;list=PLWz5rJ2EKKc9ECua7vzYbowdn-0L8WwHL&amp;index=9\" target=\"_blank\" rel=\"noopener\">Reddit<\/a>, and <a href=\"https:\/\/www.youtube.com\/watch?v=quY2B_6shy0\" target=\"_blank\" rel=\"noopener\">Dropbox<\/a>. This release largely focuses on performance improvements, as we continue to migrate modifiers and improve the efficiency of major parts of our API.<\/p>\n<p>To use today\u2019s release, upgrade your Compose BOM version to <span style=\"font-family: courier;\">2024.01.00<\/span><\/p>\n<div align=\"left\" dir=\"ltr\" style=\"margin-left: 0pt;\">\n<table style=\"border-collapse: collapse; border: none;\">\n<colgroup\/>\n<tbody>\n<tr style=\"height: 0pt;\">\n<td style=\"background-color: #f0f0f0; border-bottom: solid #e0e0e0 1pt; border-color: rgb(224, 224, 224); border-left: solid #e0e0e0 1pt; border-right: solid #e0e0e0 1pt; border-style: solid; border-top: solid #e0e0e0 1pt; border-width: 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt; vertical-align: top;\">\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"font-family: courier;\"><span style=\"background-color: transparent; color: #0d904f; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\">implementation platform(&#8216;androidx.compose:compose-bom:2024.01.00&#8217;)<\/span><br \/><\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h3>Performance<\/h3>\n<p>Performance continues to be our top priority, and this release of Compose has major performance improvements across the board. We are seeing an additional <b>~20% improvement in scroll performance<\/b> and ~12% improvement to startup time in our benchmarks, and this is on top of the improvements from the <a href=\"https:\/\/android-developers.googleblog.com\/2023\/08\/whats-new-in-jetpack-compose-august-23-release.html\" target=\"_blank\" rel=\"noopener\">August \u201823<\/a> release. As with that release, most apps will see these benefits just by upgrading to the latest version, with no other code changes needed.<\/p>\n<p>The improvement to scroll performance and startup time comes from our continued focus on memory allocations and lazy initialization, to ensure the framework is only doing work when it has to. These improvements can be seen across all APIs in Compose, especially in text, clickable, Lazy lists, and graphics APIs, including vectors, and were made possible in part by the Modifier.Node refactor work that has been ongoing for multiple releases.<\/p>\n<p>There is also <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/custom-modifiers\" target=\"_blank\" rel=\"noopener\">new guidance<\/a> for you to create your own custom modifiers with Modifier.Node.<\/p>\n<h4><span style=\"font-size: large;\">Configuring the stability of external classes<\/span><\/h4>\n<p>Compose compiler 1.5.5 introduces a new compiler option to provide a configuration file for what your app considers <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/performance\/stability\" target=\"_blank\" rel=\"noopener\">stable<\/a>. This option allows you to mark any class as stable, including your own modules, external library classes, and standard library classes, without having to modify these modules or wrap them in a stable wrapper class. Note that the standard stability contract applies; this is just another convenient method to let the Compose compiler know what your app should consider stable. For more information on how to use stability configuration, see our <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/performance\/stability\/fix#configuration-file\" target=\"_blank\" rel=\"noopener\">documentation<\/a>.<\/p>\n<h4><span style=\"font-size: large;\">Generated code performance<\/span><\/h4>\n<p>The code generated by the Compose compiler plugin has also been improved. Small tweaks in this code can lead to large performance improvements due to the fact the code is generated in every composable function. The Compose compiler tracks Compose state objects to know which composables to recompose when there is a change of value; however, many state values are only read once, and some state values are never read at all but still change frequently! This update allows the compiler to skip the tracking when it is not needed.<\/p>\n<p>Compose compiler 1.5.6 also <a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/releases\/compose-compiler#1.5.6\" target=\"_blank\" rel=\"noopener\">enables \u201cintrinsic remember\u201d<\/a> by default. This mode transforms <span style=\"color: #0d904f; font-family: courier;\">remember<\/span> at compile time to take into account information we already have about any parameters of a composable that are used as a key to <span style=\"color: #0d904f; font-family: courier;\">remember<\/span>. This speeds up the calculation of determining if a remembered expression needs reevaluating, but also means if you place a breakpoint inside the <span style=\"color: #0d904f; font-family: courier;\">remember<\/span> function during debugging, it may no longer be called, as the compiler has removed the usage of <span style=\"color: #0d904f; font-family: courier;\">remember<\/span> and replaced it with different code.<\/p>\n<h4><span style=\"font-size: large;\">Composables not being skipped<\/span><\/h4>\n<p>We are also investing in making the code you write more performant, automatically. We want to optimize for the code you intuitively write, removing the need to dive deep into Compose internals to understand why your composable is recomposing when it shouldn\u2019t.<\/p>\n<p>This release of Compose adds support for an experimental mode we are calling \u201c<b>strong skipping mode<\/b>\u201d. Strong skipping mode relaxes some of the rules about which changes can skip recomposition, moving the balance towards what developers expect. With strong skipping mode enabled, composables with unstable parameters can also skip recomposition if the same instances of objects are passed in to its parameters. Additionally, strong skipping mode automatically remembers lambdas in composition that capture unstable values, in addition to the current default behavior of remembering lambdas with only stable captures. Strong skipping mode is currently experimental and disabled by default as we do not consider it ready for production usage yet. We are evaluating its effects before aiming to turn it on by default in Compose 1.7. See our <a href=\"https:\/\/android.googlesource.com\/platform\/frameworks\/support\/+\/androidx-main\/compose\/compiler\/design\/strong-skipping.md\" target=\"_blank\" rel=\"noopener\">guidance<\/a> to experiment with strong skipping mode and help us find any issues.<\/p>\n<h3>Text<\/h3>\n<h4><span style=\"font-size: large;\">Changes to default font padding<\/span><\/h4>\n<p>This release now makes the <span style=\"color: #0d904f; font-family: courier;\">includeFontPadding<\/span> setting <span style=\"color: #0d904f; font-family: courier;\">false<\/span> by default. <span style=\"color: #0d904f; font-family: courier;\">includeFontPadding<\/span> is a legacy property that adds extra padding based on font metrics at the top of the first line and bottom of the last line of a text. Making this setting default to false brings the default text layout more in line with common design tools, making it easier to match the design specifications generated. Upon upgrading to the January \u201824 release, you may see small changes in your text layout and screenshot tests. For more information about this setting, see the <a href=\"https:\/\/medium.com\/androiddevelopers\/fixing-font-padding-in-compose-text-768cd232425b\" target=\"_blank\" rel=\"noopener\">Fixing Font Padding in Compose Text<\/a> blog post and the <a href=\"https:\/\/developer.android.com\/jetpack\/compose\/text\/style-paragraph#adjust-line-height\" target=\"_blank\" rel=\"noopener\">developer documentation<\/a>.<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"Line height with includeFontPadding as false on the left and true on the right.\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEjZSSRPeWAUnFmGd8-4PwVHiFDrMpsp-EPRYlyIxYP2gIdyLuWAKkaXpAO2vle-m4EQrxEKyxNHGYkYzs4kW9_qP4dd1OXL1I7yWHpEyfOQoKyJLw7V7tre-vRpCHLpGYhyphenhyphenw9mX3HvnV768ZRAj52IeOnqQGaXlB9Az-k7lfGNtep0dBbDPm5pH27h8s3U\/s1600\/image3.png\" width=\"100%\"\/><\/div>\n<p><\/image><\/p>\n<h4><span style=\"font-size: large;\">Support for nonlinear font scaling<\/span><\/h4>\n<p>The January \u201824 release uses nonlinear font scaling for better text readability and accessibility. Nonlinear font scaling prevents large text elements on screen from scaling too large by applying a nonlinear scaling curve. This scaling strategy means that large text doesn&#8217;t scale at the same rate as smaller text.<\/p>\n<h3>Drag and drop<\/h3>\n<p>Compose Foundation <a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/releases\/compose-foundation#1.6.0-alpha07\" target=\"_blank\" rel=\"noopener\">adds support<\/a> for platform-level drag and drop, which allows for content to be dragged between apps on a device running in multi-window mode. The API is 100% compatible with the View APIs, which means a drag and drop started from a View can be dragged into Compose and vice versa. To use this API, see the <a href=\"https:\/\/cs.android.com\/androidx\/platform\/frameworks\/support\/+\/androidx-main:compose\/foundation\/foundation\/samples\/src\/main\/java\/androidx\/compose\/foundation\/samples\/DragAndDropSamples.kt\" target=\"_blank\" rel=\"noopener\">code sample<\/a>.<\/p>\n<p><image><\/p>\n<div style=\"text-align: center;\"><img decoding=\"async\" alt=\"Moving image illustrating drag and drop feature\" border=\"0\" id=\"imgCaption\" src=\"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEhL3AMqnass7Xa2N5suD7FFZsJdrVN56_SptvqprYimpN4HQqSVWsXn5uPbRKky6BpSFYJn8YigLUjwClrUMWn0gldUvwh2xki2lvcpLN5KnZ7GadfyiCQPst7UxrNmHiB_l0qAEYEmcQjiOnqX-g_pTcyJaTT78DRmFxI4ICZSoawT8gJbNCJY5HIffoQ\/s1600\/image2.gif\" width=\"100%\"\/><\/div>\n<p><\/image><\/p>\n<h3>Additional features<\/h3>\n<p>Other features landed in this release include:<\/p>\n<ul>\n<ul>\n<li>Support for <span style=\"color: #0d904f; font-family: courier;\">LookaheadScope<\/span> in Lazy lists.<\/li>\n<li><a href=\"https:\/\/issuetracker.google.com\/187188981\" target=\"_blank\" rel=\"noopener\">Fixed<\/a> composables that have been deactivated but kept alive for reuse in a Lazy list not being filtered by default from semantics trees.<\/li>\n<li><a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/releases\/compose-animation#1.6.0-beta01\" target=\"_blank\" rel=\"noopener\">Spline-based keyframes<\/a> in animations.<\/li>\n<li><a href=\"https:\/\/issuetracker.google.com\/180639271\" target=\"_blank\" rel=\"noopener\">Added support<\/a> for selection by mouse, including text.<\/li>\n<\/ul>\n<\/ul>\n<h3>Get started!<\/h3>\n<p>We\u2019re grateful for all of the bug reports and feature requests submitted to our <a href=\"http:\/\/goo.gle\/compose-feedback\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a> \u2014 they help us to improve Compose and build the APIs you need. Continue providing your feedback, and help us make Compose better! <\/p>\n<p>Wondering what\u2019s next? Check out our <a href=\"https:\/\/developer.android.com\/jetpack\/androidx\/compose-roadmap\" target=\"_blank\" rel=\"noopener\">roadmap<\/a> to see the features we\u2019re currently thinking about and working on. We can\u2019t wait to see what you build next!<\/p>\n<p>Happy composing!<\/p>\n<\/div>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><br \/>\n<br \/>[ad_2]<br \/>\n<br \/><a href=\"http:\/\/android-developers.googleblog.com\/2024\/01\/whats-new-in-jetpack-compose-january-24-release.html\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Posted by Ben Trengrove, Android Developer Relations Engineer Today, as part of the Compose January \u201824 Bill of Materials, we\u2019re releasing version 1.6 of<\/p>\n","protected":false},"author":1,"featured_media":207077,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[146],"tags":[],"_links":{"self":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/207076"}],"collection":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/comments?post=207076"}],"version-history":[{"count":3,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/207076\/revisions"}],"predecessor-version":[{"id":343046,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/posts\/207076\/revisions\/343046"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media\/207077"}],"wp:attachment":[{"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/media?parent=207076"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/categories?post=207076"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michigandigitalnews.com\/index.php\/wp-json\/wp\/v2\/tags?post=207076"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}