From 14c5282ab256cb7a2c45a5a5a02de3b3a03d0403 Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Fri, 28 Jun 2013 11:30:14 +0200 Subject: [PATCH] Hack bug fix on pre-API level 11 devices when CAB done button is pressed. --- core/src/com/actionbarsherlock/view/SherlockListView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/com/actionbarsherlock/view/SherlockListView.java b/core/src/com/actionbarsherlock/view/SherlockListView.java index 3b2df828..5a3481d0 100644 --- a/core/src/com/actionbarsherlock/view/SherlockListView.java +++ b/core/src/com/actionbarsherlock/view/SherlockListView.java @@ -258,7 +258,11 @@ public class SherlockListView extends ListView { if (child instanceof Checkable) { ((Checkable) child).setChecked(getCheckedItemPositions().get(position)); } else if (useActivated) { - child.setActivated(getCheckedItemPositions().get(position)); + // TODO: Investigate the impact of this hack fix + // (API level < 11 devices still get to this code point when clicking teh CAB done button) + if (android.os.Build.VERSION.SDK_INT > 11) { + child.setActivated(getCheckedItemPositions().get(position)); + } } } }