Separator in AbsListView should not be clickable
In ListAdapter, isEnabled (int position) returns true if the item at the specified position is not a separator. (A separator is a non-selectable, non-clickable item). So we should not set it to clickable in accessibility node info when the item is disabled. Bug: 140017328 Test: After the fix, talkback focus will skip the separator in linear navigation. Change-Id: Id0a76a2f93b8af730dab1a808dc24a0ae24bcee0
This commit is contained in:
@@ -2569,7 +2569,8 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
|
||||
|
||||
if (isItemClickable(view)) {
|
||||
addAccessibilityActionIfEnabled(info, isItemEnabled, AccessibilityAction.ACTION_CLICK);
|
||||
info.setClickable(true);
|
||||
// A disabled item is a separator which should not be clickable.
|
||||
info.setClickable(isItemEnabled);
|
||||
}
|
||||
|
||||
if (isLongClickable()) {
|
||||
|
||||
Reference in New Issue
Block a user