diff options
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java index 11d1e8c17..ca3a26066 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/ui/adapter/KeyListSecretAdapter.java @@ -98,16 +98,7 @@ public class KeyListSecretAdapter extends CursorAdapter { mSelection.put(position, value); notifyDataSetChanged(); } - - public boolean isPositionChecked(int position) { - Boolean result = mSelection.get(position); - return result == null ? false : result; - } - - public Set<Integer> getCurrentCheckedPosition() { - return mSelection.keySet(); - } - + public void removeSelection(int position) { mSelection.remove(position); notifyDataSetChanged(); @@ -126,11 +117,12 @@ public class KeyListSecretAdapter extends CursorAdapter { /** * Change color for multi-selection */ - // default color - v.setBackgroundColor(Color.TRANSPARENT); if (mSelection.get(position) != null) { - // this is a selected position, change color! + // color for selected items v.setBackgroundColor(parent.getResources().getColor(R.color.emphasis)); + } else { + // default color + v.setBackgroundColor(Color.TRANSPARENT); } return v; } |