OSDN Git Service

Have focus avoid middle of a foucs chain when possible.
authorGeorge Mount <mount@google.com>
Tue, 27 Oct 2015 15:46:44 +0000 (08:46 -0700)
committerGeorge Mount <mount@google.com>
Fri, 6 Nov 2015 00:28:45 +0000 (16:28 -0800)
commit140ea62c385cfe0b9ab28b8c2b78d0f61a118ada
tree329cc736866e28620d4a94540d51f1f5c544a7db
parentc406898e8c8cd8003b4dbc55596f313db278e8ee
Have focus avoid middle of a foucs chain when possible.

Bug 24873983

Focus follows top->bottom left->right by default (LTR),
but that could put next focus on a View in the middle
of a focus chain (something else points to the View with
nextFocusForwardId). That means that the View pointing
to it may get skipped or it may end in a focus loop
in the chain.

Instead, we now prefer to have the next view be one that
is at the head of a chain (forward) or tail of a chain
(backward).

Change-Id: Icb59f01c1406bc89ef3494fdc5be109e465aa8bc
core/java/android/view/FocusFinder.java