From 26268f93ce110173ca7e0d904ca877c4b40d1944 Mon Sep 17 00:00:00 2001 From: George Mount Date: Fri, 18 Dec 2015 13:00:46 -0800 Subject: Fix problem where enter and space key do nothing on ListView. Enter should select the currently focused item. It was doing nothing. Change-Id: I149ed72804234c1c1da4a7a9be8c9f405722d4ec --- core/java/android/widget/ListView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java index 064808bcbe5f..a11897da3b00 100644 --- a/core/java/android/widget/ListView.java +++ b/core/java/android/widget/ListView.java @@ -2181,7 +2181,7 @@ public class ListView extends AbsListView { boolean handled = false; int action = event.getAction(); if (KeyEvent.isConfirmKey(keyCode) - && event.hasNoModifiers() && action == KeyEvent.ACTION_UP) { + && event.hasNoModifiers() && action != KeyEvent.ACTION_UP) { handled = resurrectSelectionIfNeeded(); if (!handled && event.getRepeatCount() == 0 && getChildCount() > 0) { keyPressed(); -- cgit v1.2.3-59-g8ed1b