AutoSize TextView (part 8) - APIs for predefined sizes
* getter/setter for predefined sizes
* reads and configures from XML at construction time
* fix for an ugly bug where the sizes were missing an
entry in certain cases, e.g: min = 10; max = 20;
step = 2 would have produced [10, 12, 14, 16, 18]
instead of [10, 12, 14, 16, 18, 20]
* fix using getHeight()/getWidth() instead of
untrusted getMeasuredHeight()/getMeasuredWidth()
and move the auto-sizing triggering to
onLayout() instead of onMeasure() (while manually
testing discovered missing or extra pixels and
sometimes resizing being skipped - it's all fixed
now)
* fix using deceiving getTotalPaddingBottom()/...Top()
and replaced with getExtendedPaddingBottom()/..Top()
(getTotal... was removing the whitespace height but
auto-size needs to know about it so it can fill the
space)
Bug: 32221168
Test: attached in the same topic
run cts-dev -m CtsWidgetTestCases -t \
android.widget.cts.TextViewTest
Change-Id: Id5a31d0d32b2b4082af45b4bd65af8cb85bdc92e
4 files changed