View attachment calls jumpDrawablesToCurrentState(), so the view state
needs to be set up prior to attachment. For views that are already
attached but are being moved to a new position, manually jump.
Cleans up comments in methods that were modified.
Bug: 29978498
Change-Id: Ica27b2c60ad7ee98b9d1e4912c4f8b8c248af88d
(cherry picked from commit 26489e1688)
When we want the WindowManager to clip our requested width/height
to the display frame, we need to pass DISPLAY_CLIP_VERTICAL/HORIZONTAL.
It seems this behavior was unintentionally applied without this flag
in previous releases.
Bug: 29602363
Change-Id: Ib98060e36efde0dbaabb59a758da5374035dbb62
At the point of showDropDownPosition measure
may have not yet been called and we can't try
and resolve WRAP_CONTENT. ViewRoot will do it for us
and set requestedWidth/Height at an appropriate point.
Bug: 29496188
Change-Id: I99f26612bec800f3e321495b3df3e37b5ffb3152
For the setClipToScreen case we need constraint to
the available display area, but not to the parent window.
If we don't pass FLAG_LAYOUT_NO_LIMITS, we will be constrained
to the parent window. However when we do pass it, we will
not be constrained to the system insets. So, we can pass
FLAG_LAYOUT_NO_LIMITS and constrain ourselves to the insets
via getWindowVisibleDisplayFrame. We also need to avoid
calling setWidth/Height with these resolved values
so we can preserve the indeterminate values in case
layout changes (e.g. rotation).
Bug: 29166136
Change-Id: I4c7c6204e6bc1cdcf4ad86f7e99e3511d4312ae4
This CL fixes a bug in AbsListView where it was not invalidating
children's bounds when AbsListView's bounds change. This was
triggering bugs where if you set padding on a list view, it would
not resize its children.
Bug: 28800232
Change-Id: I81a4e9ea234c395de80efea5ef5e47a71cb95136
am: 92d0316d28
* commit '92d0316d2837baceffb22e1a7eb0e5da50f0a025':
Set StaticLayout.maxLines only when ellipsize is set
Change-Id: I2b0281da1d8aba5f84da01c00f31d79af901db35
A partial revert for the CL I5dbc48a6c7f0f4ac4c693d5c95f0a99b989e07f4.
The mentioned CL tried to always set the maxLines attribute of
StaticLayout. However this caused regressions at certain points.
Bug: 28885989
Bug: 28468120
Change-Id: Ic09cb194c8811a06b5d53de50bfb77938b91b88d
The relative time was unclear for certain locales
and even worse 1m was spoken as 1 meter.
Change-Id: Ie172092da27ea8119906b0c301b5569bf3efabbb
Fixes: 28961667
When maxLines is set on StaticLayout and the text is wrapped, during
onMeasure TextView couldn’t recognize the wrap in the layout and tried
to reuse the layout which in turn caused width calculation problems.
This CL checks if maxLines is set, and if there is a text cut-off in
order to reuse existing layout.
Bug: 28468120
Change-Id: Ide43df8512a09112715067cbadf29cc64fd53247
When transformation method is set via API, text direction heuristics has
to be reset since for PasswordTransformationMethod it is set to LTR. Not
resetting it causes inconsistencies with the remaining of the TextView.
Bug: 28562779
Change-Id: I225e35e39bde60d4296852ff17b107d5b7b99f8a