Skip to content
Commit f6b2c6ec authored by Evan Rosky's avatar Evan Rosky
Browse files

Don't allow 0-sized views to be focused.

These zero-sized views tend to make keyboard navigation
difficult for users since focus "disappears" sometimes.

This takes a best-effort approach for focus requested
prior to layout: If a View hasn't been laid-out and is
asked to take focus, it will act as though this size
constraint doesn't exist. Then, upon layout, it will
defocus itself if it still has no size.

Bug: 32072305
Test: Added CTS View_FocusHandlingTest#testSizeHandling
Change-Id: I33977247272f4551f3f095680867fd8d1e30682b
parent 2dd2cbcb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment