summaryrefslogtreecommitdiff
path: root/libs/androidfw/FileStream.cpp
diff options
context:
space:
mode:
author Anton Potapov <apotapov@google.com> 2023-01-05 15:18:38 +0000
committer Anton Potapov <apotapov@google.com> 2023-01-10 18:16:02 +0000
commit675ff0fe3756eb07baffba4bfc18b5bd2c289b01 (patch)
tree97eb9566c232a8876eb73dfdbf304170c0c1ec7f /libs/androidfw/FileStream.cpp
parent8165fae2c8286f1b620e47aa741980f60849a5b6 (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
Diffstat (limited to 'libs/androidfw/FileStream.cpp')
0 files changed, 0 insertions, 0 deletions