diff options
author | Petar Šegina <psegina@google.com> | 2017-08-07 12:37:52 +0100 |
---|---|---|
committer | Petar Šegina <psegina@google.com> | 2017-08-09 21:14:37 +0100 |
commit | fb748b357cec2fc8244cce5af8486a72756ded41 (patch) | |
tree | 5d6c1f91c4d8107c26b0857f2cfe37db477208e2 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | e9d435302b04188c7b5fe2da1060ae3f7f16c35b (diff) |
Add getSelection(..., RectangleConsumer) to Layout
In order to generate the Smart Select animation, we need a list of
rectangles which represent a given selection. The current
getSelectionPath code can only fill out a Path, which loses the
rectangle information in the process.
Instead of working directly with a Path, a RectangleConsumer is
introduced, which is an abstraction over an element that can accept
rectangles (for example, a Path or a List<Rect>).
getSelectionPath is now implemented with this new method using a simple
consumer which takes the rectangles and feeds them to the path.
Test: cts-tradefed run cts-dev -m CtsWidgetTestCases -d -t android.widget.cts.TextViewTest#testGetFocusedRect
Test: manual - verify text selection still works
Change-Id: I32a24f237a4b1b89df23c982fe06566f30fec464
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions