OSDN Git Service

Draw a default focus highlight if needed.
authorJiaquan He <hejq@google.com>
Mon, 6 Feb 2017 23:59:26 +0000 (15:59 -0800)
committerJiaquan He <hejq@google.com>
Wed, 12 Apr 2017 18:24:52 +0000 (18:24 +0000)
commit8062949ece210df7c7a61478448d05c8ad286d58
treea2453e8c7b3eea624dd7c353a16bbae2cef5479a
parentb7daaf8b5f9a41f92da58d86bf4be758ac27df6c
Draw a default focus highlight if needed.

This commit draws a default highlight for a focused
View if it's detected to have no state_focused defined
and its useDefaultFocusHighlight attribute is true.

When we detect a default highlight is needed, we show it
on top of the view to. Once we detect that it's no longer
needed, we remove it.

Test: Check that views without a focused_state in its
state spec have a default highlight when they get focused.
Bug: 35096940

Change-Id: Ifbe4bb9e1297d98845314e24d8b758f14e5987a9
core/java/android/view/View.java