Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 995c043a authored by Adam Powell's avatar Adam Powell
Browse files

Fix ListView click handling under new focus rules

ListView historically uses View#hasFocusable to change signifcant
behavior around the clickability of items: an item view with any
focusable children could not be clicked via an item click
listener. Many apps therefore have sub-views in list items that are
deliberately clickable, but not focusable. This comes up in cases like
overflow menu buttons on list items.

Now that we have auto-focusability triggered when a view is set as
clickable, the expectations of apps using this pattern have changed.

Create an overload of hasFocusable that optionally can filter out
auto-focusable views in its results. Have ListView use it to preserve
its previous behavior. This isn't public API for now, but perhaps it
should be if this pattern shows up in practice in places other than
ListView.

Bug: 34756767
Change-Id: Ie71ee6e388449f634b30f9162a8b3fa578e32db8
parent 39cb8895
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