Skip to content
Commit 9fe208fe authored by Andrei Stingaceanu's avatar Andrei Stingaceanu
Browse files

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
parent 155c3a88
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment