OSDN Git Service

Add support for automatic focusability determination
authorEvan Rosky <erosky@google.com>
Sat, 17 Dec 2016 01:27:55 +0000 (17:27 -0800)
committerEvan Rosky <erosky@google.com>
Thu, 19 Jan 2017 23:39:05 +0000 (15:39 -0800)
commit4c8c963eced8e145ecf314a41c8396c7df8e0a39
tree6e1c75c4320d999355d418e9cfe5da2a6f745d13
parent2cddef3329c751262e9783f760c1761972278272
Add support for automatic focusability determination

New android:focusable attribute value "auto" and corresponding constant
FOCUSABLE_AUTO specifies that the framework can determine a view's
focusability. For now, the only "auto" logic is that focusable = clickable.

This has the effect of making clickable views focusable by default
unless the developer has explicitly set them focusable=false.

Bug: 31963283
Change-Id: Icce768fa701966970ea6b3469b33a4ef97ebc3ea
Test: Added CTS test, related CTS passes, made a test-app which
      enumerates all clickable/focusable combinations to verify
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/view/View.java
core/java/android/widget/RatingBar.java
core/java/android/widget/SearchView.java
core/java/android/widget/TextView.java
core/res/res/values/attrs.xml