OSDN Git Service

Drag to select text: add some slop for moving between lines
authorMady Mellor <madym@google.com>
Wed, 17 Jun 2015 16:46:01 +0000 (09:46 -0700)
committerMady Mellor <madym@google.com>
Wed, 17 Jun 2015 16:46:01 +0000 (09:46 -0700)
commitf9f8aebdc697e6ea1deff1aa82d0cec0e1ebacef
treee24a32f06b72d47136e80b609771840e75400823
parent13e54ff0ebc5fe6f425c16d9d30ea9ecd5db1348
Drag to select text: add some slop for moving between lines

It's pretty easy to accidentally move to a different line when
selecting text. This CL makes an adjustment so that if the user
is on a line, they must move above the top of it + slop to move
up a line, and they must move below the bottom of it + slop to move
down a line. This applies the changes to the drag accelerator.

This CL also makes an adjustment to not apply the finger offset
to the drag accelerator until the user has moved lines, this was
causing an issue where it would immediately include the above line
when initiating the selection.

Bug: 21306433
Bug: 21303943
Change-Id: Id240136493f62524fe6445d8bd65479084fe8126
core/java/android/widget/Editor.java