Assigned
Status Update
Comments
ha...@google.com <ha...@google.com>
ja...@squareup.com <ja...@squareup.com> #2
When you include androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha05, you are upgrading all of its transitive dependencies, which includes lifecycle-runtime. However, you are *not* upgrading lifecycle-process, which is still using the version of lifecycle from your lifecycle-extensions dependency (2.1.0).
You do any one of the following:
- Add an explicit dependency on lifecycle-process:2.2.0-alpha05 to pull in the new version that is compatible with lifecycle-runtime:2.2.0-alpha05
- Upgrade your lifecycle:extensions dependency to 2.2.0-alpha05 so that lifecycle-process is upgraded
- Remove the lifecycle:extensions dependency entirely and use only the lifecycle libraries you need (for example, use lifecycle-viewmodel-ktx if you want ViewModels) so that you don't pull in lifecycle-process at all
Mixing and matching Lifecycle versions is not a supported configuration, so I'd recommend keeping to using just a single version.
You do any one of the following:
- Add an explicit dependency on lifecycle-process:2.2.0-alpha05 to pull in the new version that is compatible with lifecycle-runtime:2.2.0-alpha05
- Upgrade your lifecycle:extensions dependency to 2.2.0-alpha05 so that lifecycle-process is upgraded
- Remove the lifecycle:extensions dependency entirely and use only the lifecycle libraries you need (for example, use lifecycle-viewmodel-ktx if you want ViewModels) so that you don't pull in lifecycle-process at all
Mixing and matching Lifecycle versions is not a supported configuration, so I'd recommend keeping to using just a single version.
ha...@google.com <ha...@google.com> #3
Sorry and thank you for your time
ap...@google.com <ap...@google.com> #4
After thinking about this some more, I think we can do something here to maintain compatibility since I suspect that there will be other cases where lifecycle-runtime is updated through some other dependency and that shouldn't force you to upgrade lifecycle-extensions / lifecycle-process.
Description
It is currently difficult to draw custom spans for
Text()
becauseTextLayoutResult
does not expose any APIs for accurately reading line bounds. Considering thatAndroidParagraph
already has APIs such asgetLineAscent()
,getLineBaseline()
andgetLineDescent()
, can they be bubbled up toTextLayoutResult
?Having access to
getTopPadding()
andgetBottomPadding()
fromandroid.text.Layout
would also be helpful.AFAIK, there is currently no workaround for reading these values. Inspecting font metrics would have been one option, but that is not available either ( https://issuetracker.google.com/issues/173648606 ).