OSDN Git Service

Ellipsized and Non-ellipsized baselines should be same.
authorSiyamed Sinir <siyamed@google.com>
Sat, 13 Feb 2016 02:03:55 +0000 (18:03 -0800)
committerSiyamed Sinir <siyamed@google.com>
Sat, 13 Feb 2016 02:23:37 +0000 (18:23 -0800)
commit715589fb46967ce8aff4406ca7bfc58ad3e3b6ed
treeaf16935a95c40ee7d284d400a794ed47d065405f
parentd7d584b225391d662e9f57cc7bcc3c96af532023
Ellipsized and Non-ellipsized baselines should be same.

This CL make sure that ellipsized and non-ellipsized text have the
same baseline.
- TextView did not set the maxLines for StaticLayout when ellipsized
is false. This resulted in height and baseline calculation
discrepancies between ellipsized and non-ellipsized TextViews using
StaticLayout.
- For single line TextViews when a text is not ellipsized
BoringLayout is used, and when text is ellipsized StaticLayout is
used. Because of the bottom padding added to the last line of
StaticLayout, those two did not have the same baseline.

Bug: 18864800
Change-Id: I5dbc48a6c7f0f4ac4c693d5c95f0a99b989e07f4
core/java/android/text/BoringLayout.java
core/java/android/widget/TextView.java