summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2017-07-25 13:52:57 -0700
committerRoozbeh Pournader <roozbeh@google.com>2017-07-26 18:26:01 -0700
commit287c8d6fe9c794ae2c1ee8fd8f7dc8a0ac31f9d1 (patch)
tree52d9957379adbf143db3161dacdb7f2370961015 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9ea756fa7047a70ade7bc9d3c06d00605addf211 (diff)
Make ellipsize retry if text doesn't fit
This fixes the cases where the replacement of parts of text with ellipsis may result in more-than-expected width of text due to contextual width changes in the font, such as kerning or Arabic shaping. The calculations in TextUtils.ellipsize() and StaticLayout are fixed to recalculate the new width and reduce it further until the text actuall fits. BoringLayout and DynamicLayout get fixed too since they use the other two implementations indirectly. Also reverse a recently-introduced incorrect check for multi-character ellipsis in Layout.java. Fixes: 31537595 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: FrameworksCoreTests:android.text. Change-Id: I3532820e12ac45a46e28fe2f8bb17dcd0a345916
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions