summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2009-06-09 12:07:28 -0500
committerKenny Root <kenny@the-b.org>2009-06-09 13:47:00 -0500
commit158c19020b60cf1c807d8bf40052b7091b2c08c4 (patch)
treeaf64772f59d5fd1b2385be4ddf360e285ec6c880 /core
parent9b90fd4fa11eb32403f99c60d23abe4d9c5bf8d5 (diff)
downloadframeworks_base-158c19020b60cf1c807d8bf40052b7091b2c08c4.zip
frameworks_base-158c19020b60cf1c807d8bf40052b7091b2c08c4.tar.gz
frameworks_base-158c19020b60cf1c807d8bf40052b7091b2c08c4.tar.bz2
Fix logic inversion in ListView Javadoc
The Javadoc for isItemChecked, getCheckedItemPosition, and getCheckedItemPositions stated the return was valid if conditions were the inverse of what the method checked for. This was pointed out in Android issue 2366
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/ListView.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index a786b3f..64e5452 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -3167,11 +3167,12 @@ public class ListView extends AbsListView {
/**
* Returns the checked state of the specified position. The result is only
- * valid if the choice mode has not been set to {@link #CHOICE_MODE_SINGLE}
+ * valid if the choice mode has been set to {@link #CHOICE_MODE_SINGLE}
* or {@link #CHOICE_MODE_MULTIPLE}.
*
* @param position The item whose checked state to return
- * @return The item's checked state
+ * @return The item's checked state or <code>false</code> if choice mode
+ * is invalid
*
* @see #setChoiceMode(int)
*/
@@ -3185,7 +3186,7 @@ public class ListView extends AbsListView {
/**
* Returns the currently checked item. The result is only valid if the choice
- * mode has not been set to {@link #CHOICE_MODE_SINGLE}.
+ * mode has been set to {@link #CHOICE_MODE_SINGLE}.
*
* @return The position of the currently checked item or
* {@link #INVALID_POSITION} if nothing is selected
@@ -3202,10 +3203,12 @@ public class ListView extends AbsListView {
/**
* Returns the set of checked items in the list. The result is only valid if
- * the choice mode has not been set to {@link #CHOICE_MODE_SINGLE}.
+ * the choice mode has not been set to {@link #CHOICE_MODE_NONE}.
*
* @return A SparseBooleanArray which will return true for each call to
- * get(int position) where position is a position in the list.
+ * get(int position) where position is a position in the list,
+ * or <code>null</code> if the choice mode is set to
+ * {@link #CHOICE_MODE_NONE}.
*/
public SparseBooleanArray getCheckedItemPositions() {
if (mChoiceMode != CHOICE_MODE_NONE) {