diff options
| author | 2023-01-05 15:18:38 +0000 | |
|---|---|---|
| committer | 2023-01-24 01:30:21 +0000 | |
| commit | 34696dcb976697688c8238fcc7260be3d47d72c2 (patch) | |
| tree | fcce471a6120520c65435b3f5b2b74f42b05de76 /libs/androidfw/FileStream.cpp | |
| parent | 8adc88a15f1b7c7a291e0def179a42b987fef30e (diff) | |
Fix QS header constraints so status icons are now ellipsized where there
is lack of space.
Previously:
There was a chain [date]-[space]-[status icons]-[battery]. That's why we should add bias and space to make it working.
But there're several problems with this:
1) app:layout_width="WRAP_CONTENT" + app:layout_constrainedWidth=”true" != app:layout_width="0dp" + app:layout_constraintWidth_default="wrap". The first one gets view expanded like it's MATCH_PARENT.
2) I've found out that wrapping views in constraint layout 2.0.0 may not always work as expected with app:layout_constrainedWidth=”true" (the view get's stretched as it's match_parent). layout_constraintWidth_max="wrap" should've help with this, but motion layout can't parse this attribute in constraint set. That's why my solution is to reimplement the layout a little bit
This behavior is reported here: https://github.com/androidx/constraintlayout/issues/713
Now:
[date] and [battery] are constrained to the sides and [status icons] occupy the whole space between them.
[date] is always WRAP_CONTENT because there's always some space and we want to show it.
[battery] and [status icons] are wrap content with constraints restrictions to make them fill all the space left
Test: manual: phone + tablet
Fixes: 260364389
Change-Id: I4d54b795cc4e96f6c204f2f00aff7607572d9aa3
(cherry picked from commit 675ff0fe3756eb07baffba4bfc18b5bd2c289b01)
Merged-In: I4d54b795cc4e96f6c204f2f00aff7607572d9aa3
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions