summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorAhaan Ugale <augale@google.com>2021-04-15 18:49:42 -0700
committerAhaan Ugale <augale@google.com>2021-04-16 19:38:28 -0700
commit71106418814942cf29940ea428ea4e5b0755be80 (patch)
tree7da8c358aee84795de97155ad9930cd87495aeb9 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent1198ed066befaaa96ce12e0479a92626ec3baf41 (diff)
AutoTranslate: Pad view text for compatibility reasons.
Some apps operate on the view text based on layout calculations made on the transformed text. This can cause issues (even crashes) if the transformed text is longer than the original, as is often the case with Translate. A previous temporary fix, I685ae4a9752c817db81f0d736f1d746b2e4a9839, ellipsized the translated text. This change fixes it properly by instead padding the original text. A followup change will make this controllable by API instead of padding every TextView. The en space character, U+2002, is used for the padding here. It seems to work well in practice for multiple languages. We don't make this configurable through API as it could make debugging harder (issues triggered by server-side changes). Bug: 179693024 Test: atest CtsTranslationTestCases Test: manual - toggling between original and translated, scrolling, new views appearing, multiple apps Change-Id: I9d7db5d2bc200e4042baf3267796f00cfc298f19
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions