Adding the ability to mark TextView as a heading, and
to provide a heading depth. Plumbing that through to
accessibility services.
Bug: 34687453
Test: Adding CTS tests for new APIs.
Change-Id: I5262e32a2a11b2577802c68e701d2856e28abc21
The fact that View's constructor may call other methods before the
TextView constructor has a chance to initialize values means that
getText() may return null in the rare case where it is called
before the constructor.
Protect getText() from running into errors when the text is null,
as it just means the value is not ready yet.
Bug: 71638589
Test: CTS in topic
Change-Id: Ie11233416385353f78e3ee27fb0d3ec9b671512f
This CL makes the magnifier follow the finger rather than the cursor in
text editing. Hence, the magnifier's movement becomes horizontally
smooth, rather than only jumping at the same time with the cursor.
Vertically it remains stable relative to the current line.
Bug: 70508649
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I7e06a7064f0a413379b30c5e2d11ee85d2ad3720
- EntityConfidence is no longer generic because it doesn't mix well with
being Parcelable.
- Deprecated OnClick listeners in TextClassification as they can't be
parceled. (Outright removed the secondary listeners that were not part
of any release)
- Classes that were present in previous releases have their parceling
factored out into ParcelableWrapper helper classes for backwards
compatibility.
Bug: 67609167
Test: Added
Change-Id: I820ca4abc6b80f90007ab4424bc5df2a14f797b0
There is already MeasuredText, so renamed existing MeasuredText to
MeasuredParagraph, then renamed PremeasuredText to MeasuredText.
Bug: 67504091
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsTextTestCases:*
Change-Id: Ie20bea9501b18fabb36f64d388a7851c4643d4c3
..and also extract common code into a common superclass
This also preserves the order of the throttled events
(TYPE_VIEW_SCROLLED & TYPE_WINDOW_CONTENT_CHANGED) with regards to the rest
of events by flushing any pending throttled events immediately if another
event is requested to be sent.
Test: ensure no new a11y CTS failures
Change-Id: I948a16716521974393aaa1cf822d0a0324e9ce3a
Add API to enable/disable fallback line spacing in TextView.
Test: bit FrameworksCoreTests:android.widget.TextViewFallbackLineSpacingTest
Bug: 65161512
Change-Id: I76ba7bdb7d25c7a94653144536295c50d8b0e495
Such resource id is useful to help the autofill service heuristics to figure out
the meaning of the labels without relying on their localized text. For example,
the id could be "username", while the text could be "Nome do usuario".
Test: atest CtsAutoFillServiceTestCases:LoginWithStringsActivityTest
Fixes: 71552872
Change-Id: I13f7080fb3c67f91492a113115ffa43d185d192a
Previously we are comparing the clamped coordinates to avoid
unnecessary update of magnifier content. However if the magnifier is
reaching to the edge of the screen it doesn't update itself because
coordinates passed to Magnifier#show() later are clamped to the same.
This CL compares the coordinates without clamping to fix the issue.
Bug: 70580848
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual test with WebView that shows the magnifier works.
Change-Id: I65d681da334d5037a924e733d1a27cfd77231726
EditText#getText assumes the text is editable. However if this is
called during construction, the text might still be a String.
Bug: 36972818
Test: bit CtsWidgetTestCases:.EditTextTest
Change-Id: I811fad057f33666692930cb60d696740f7b40a19
Bug: 70771205
In order to test TextClock being only updated by the 12/24
hour setting, we must disable the clock tick from causing
the text to change. Otherwise whenever the minute changes,
the clock text would update. This leads to a flaky test.
Test: I4917a2296744697f1b50a17e3c5eb5873d567a47
Change-Id: Ifb669af3e6b882eb7c158b7de16e7eb2f0c48f61