OSDN Git Service

Refactor TextView TextAppearance attributes reading
authorClara Bayarri <clarabayarri@google.com>
Wed, 26 Jul 2017 13:56:46 +0000 (14:56 +0100)
committerClara Bayarri <clarabayarri@google.com>
Tue, 1 Aug 2017 16:12:01 +0000 (17:12 +0100)
commitd2781160f1c5900565a29043da1e5848c6b98bda
tree1b98bd1b44d8dda81a5105ee9686c102f0184d0f
parent3a26d3d3079f237672da0cbdb0a6b2807a6abc8c
Refactor TextView TextAppearance attributes reading

Attributes that can appear in a TextAppearance are read in 3
different places inside TextView:
- Within the TextAppearance in the constructor
- Within the Style in the constructor
- Within setTextAppearance

This change simplifies the attribute reading code so it only
happens in one place. Note the way TextView reads these attributes
is first populating them from the TextAppearance and then allowing
them to be overriden by the style. The same is accomplished here.

For testing purposes and for API consistency, this change also adds
the missing APIs
- isAllCaps
- isElegantTextHeight

Bug: 64053645
Test: bit CtsWidgetTestCases:.TextViewTest
Change-Id: Iad6c1c6515992a51020c656edabea4e2927572f3
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/widget/TextView.java