This behavior is currently broken due to the format of the rectangles
returned by Layout::getSelection. Let's disable the animation in
multiline scenarios until this behavior is fixed.
Test: manual - enable Smart Select flag and test over single and
multiple lines
Change-Id: Id0c49a0d69a8f2bdb449cfc8f0ed43e529f41cc1
Test: manual - trigger smart select in a TextView
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I2b147a9cc4cbb79118bb78d948bac76a63cf4253
Various methods on ArrayAdapter throw exceptions if run on an adapter
created with one of the varargs constructors. This is because those contructors
create an Arrays.ArrayList, which does not allow modification. It is not
worth changing the existing behavior, but it is worth making the behavior
clearer in the docs.
Bug: 63802412 ArrayAdapter crashes when calling clear() directly after constructor
Test: docs-only fix. Verified with unit test that the docs apply correctly to the
newly-documented methods. Built the docs target successfully.
Change-Id: I75ae233879cc7db10853f93d78625a00675594b2
Previously, measures all paragraph for deciding view width.
However, in case AT_MOST measurment, we can stop calculating measure if
the measured paragraph already exceeds the upper limit.
Bug: 64389125
Test: bit CtsWidgetTestCases:*
Test: CorePerfTest. Here is a result before and after this patch.
Before:
INSTRUMENTATION_STATUS: measure_AtMost_median=50332114
INSTRUMENTATION_STATUS: measure_Exactly_median=28276317
INSTRUMENTATION_STATUS: measure_Unspecified_median=50193036
After:
INSTRUMENTATION_STATUS: measure_AtMost_median=28475187
INSTRUMENTATION_STATUS: measure_Exactly_median=26944710
INSTRUMENTATION_STATUS: measure_Unspecified_median=50880088
Change-Id: I2a39eb39817a8f845c4fa2e174a905a2d057096e
Bug 64359848
Monkey found a divide-by-zero error caused by the width not set
when focus was changed before layout. This CL just ensures that
there is no divide by zero by selecting the first row/column.
Test: manually launched Date Picker and it didn't crash
Change-Id: Id6dd12cd20b052af71ab980c8a694020ea679e7c
Attributes that can appear in a TextAppearance are read in 3
different places inside TextView:
- Within the TextAppearance in the constructor
- Within the Style in the constructor
- Within setTextAppearance
This change simplifies the attribute reading code so it only
happens in one place. Note the way TextView reads these attributes
is first populating them from the TextAppearance and then allowing
them to be overriden by the style. The same is accomplished here.
For testing purposes and for API consistency, this change also adds
the missing APIs
- isAllCaps
- isElegantTextHeight
Bug: 64053645
Test: bit CtsWidgetTestCases:.TextViewTest
Change-Id: Iad6c1c6515992a51020c656edabea4e2927572f3
The double bidi cursor is not user friendly. Almost no native speaker
of bidi languages likes the double cursor.
Now we always show one cursor.
Change-Id: I249befaf70630bef435c8db9039e8aacf233bf7c
Fixes: 63542996
Test: Manual (no more double cursors, bidi editing feels OK)
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.text.
Test: bit FrameworksCoreTests:android.widget.EditorCursorTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
AutoSize now takes the text transformation method into
account when measuring the view.
Bug: 63889588
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -t
android.widget.cts.TextViewTest#testAutoSizeCallers_setTransformationMethod
Change-Id: I52f4bf6ea2f45342efa04b742a9debdac69f9c4c
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Test: bit FrameworksCoreTests:android.widget.EditorCursorTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Bug: 30870806
Change-Id: I54f014b06af328c3e9a9c4ddb5a3348a26e290c2
Overscroll updates:
Same shape, but smaller radius (doesn't come as far into the view)
and more translucent (max 15% instead of 50%). Overall, more subtle.
Toast updates:
Light background, smaller, dark font, closer to the bottom of the
container.
Test: manual unit tests. Also:
cts test ToastTest for toast changes
cts test EdgeEffectTests for EdgeEffect changes (adding some tests to
known-failures for now, due to brittle golden-image failures - see
CL ag/2596621)
Bug: 30563264 Refresh toast visuals for Android ODR
Bug: 63010438 Tweaks to overscroll animation
Change-Id: I0fac6322b0b81d030c8d174852c134211290bbea
Allow developers to easily add their own debugging info
when developing custom ViewGroups.
Bug: 30117235
Test: tests still pass
Change-Id: Ia83005b4dc727c7b959a50e7b0130582f6e89762
Also remove an already-done TODO item.
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.EditTextTest
Test: bit CtsWidgetTestCases:android.widget.cts.CheckedTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.AutoCompleteTextViewTest
Test: bit CtsWidgetTestCases:android.widget.cts.MultiAutoCompleteTextViewTest
Test: adb shell am instrument -w -e package android.text com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I0c91ac3ad4ab5794c1e36f1f5e576d52acad66b2
When TextView or EditText contains text that is larger than the
total parcelable limit, some of the FloatingToolbar operations would
crash.
This CL changes the behavior as follows:
- Show a toast message if cut or copy operation fails because it cannot
set the primary clip.
- Trim the text for share and process_text actions
- A simple app with an EditText and a long text in it, would not open
since Autofill value was being sent over IPC. Trimmed the text that is
sent for Autofill feature.
- Trim the value send to accessibility services
Test: bit CtsWidgetTestCases:.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Test: bit FrameworksCoreTests:android.text.TextUtilsTest
Test: Manual sample app test
Bug: 8013261
Change-Id: Ia0df6b4eb4c13071a1bf75cedac7241c7239663c
lineSpacing attributes are not applied for last lines of a text. Update
ApiDocs accordingly.
Test: none
Bug: 30508784
Change-Id: I83593d0b57f717deb90ac8d589673b61358bc914
Bitmap sizes could be arbitrary large when they were sent
over to the system. We're now reducing them to reasonable
sizes.s
Also fixed that notification bitmaps were not put into
ashmem anymore since it got lost in a refactor.
Test: code inspection
Bug: 62319200
Merged-In: I87db7656e749666b9eab1f67fd497f155c407e18
Change-Id: I87db7656e749666b9eab1f67fd497f155c407e18
Bitmap sizes could be arbitrary large when they were sent
over to the system. We're now reducing them to reasonable
sizes.s
Also fixed that notification bitmaps were not put into
ashmem anymore since it got lost in a refactor.
Test: code inspection
Bug: 62319200
Change-Id: I87db7656e749666b9eab1f67fd497f155c407e18
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Bug: 62340817
Change-Id: Ifbf2c39d9f304251adc8c4acdf1b4fd6914011d8