commit | a883678e89452a1a2532707502f968f96ff70693 | [log] [tgz] |
---|---|---|
author | Halil Ozercan <halilibo@google.com> | Thu Jun 23 17:17:19 2022 +0100 |
committer | Halil Ozercan <halilibo@google.com> | Tue Jun 28 00:31:39 2022 +0100 |
tree | 07bd8267ba6a6b8ac13db557b635e109304a150c | |
parent | bc33dac7885a6d535b19607485716dbad801fb69 [diff] |
Introduce TextMeasurer and TextLayoutCache to enable arbitrary text layout computation. TextMeasurer is a new Experimental API that is responsible for measuring a complete multi-styled text layout. BasicText internally uses a class called TextDelegate to manage its layout logic. TextMeasurer adopts the layout logic from TextDelegate and adds an internal cache to optimize for 2 common use cases. These are; 1) Calling measure outside of composition where result cannot be `remember`ed. Cache size optimizes for different text measurements. 2) Non-layout-affecting changes like color, brush, shadow are skipped by TextMeasurer. Result is returned from cache if available. TextLayoutCache is not exposed publicly due to its strong coupling to TextMeasurer. Cache size can still be configured through TextMeasurer ctor. Relnote: "Introduce a new experimental API called TextMeasurer that enables arbitrary text layout computation that creates identical results to BasicText, independent from Compose runtime." Test: compose:ui:ui-text:cAT Change-Id: I1710117775b135a2e2a01361758aa96c2c5193cc
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. These components help you follow best practices, free you from writing boilerplate code, and simplify complex tasks, so you can focus on the code you care about.
Jetpack comprises the androidx.*
package libraries, unbundled from the platform APIs. This means that it offers backward compatibility and is updated more frequently than the Android platform, making sure you always have access to the latest and greatest versions of the Jetpack components.
Our official AARs and JARs binaries are distributed through Google Maven.
You can learn more about using it from Android Jetpack landing page.
For contributions via GitHub, see the GitHub Contribution Guide.
Note: The contributions workflow via GitHub is currently experimental - only contributions to the following projects are being accepted at this time:
When contributing to Jetpack, follow the code review etiquette.
We are not currently accepting new modules.
Head over to the onboarding docs to learn more about getting set up and the development workflow!
Our continuous integration system builds all in progress (and potentially unstable) libraries as new changes are merged. You can manually download these AARs and JARs for your experimentation.
Before uploading your first contribution, you will need setup a password and agree to the contribution agreement:
Generate a HTTPS password: https://android-review.googlesource.com/new-password
Agree to the Google Contributor Licenses Agreement: https://android-review.googlesource.com/settings/new-agreement
AndroidX uses git to store all the binary Gradle dependencies. They are stored in prebuilts/androidx/internal
and prebuilts/androidx/external
directories in your checkout. All the dependencies in these directories are also available from google()
, jcenter()
, or mavenCentral()
. We store copies of these dependencies to have hermetic builds. You can pull in a new dependency using our importMaven tool.