OSDN Git Service

Update getCheckedItemPositions() documentation
authorCyril Mottier <cyrilmottier@gmail.com>
Tue, 23 Jul 2013 11:58:33 +0000 (13:58 +0200)
committerCyril Mottier <cyrilmottier@gmail.com>
Tue, 23 Jul 2013 11:58:33 +0000 (13:58 +0200)
commit82ff241fd6a82843a8d9d87a1a01c7315079e3d4
tree97f9c5e8a341d6e76ea4e76bb564fc95620b0a95
parent53771e5f955f67035cf6b6432c34171a18ab14dc
Update getCheckedItemPositions() documentation

getCheckedItemPositions()'s documentation previously mentioned the
returned SparseBooleanArray was only containing checked item positions
(i.e. get(int position) always returning true). In practice, this is
wrong, because getCheckedItemPositions() returns mCheckStates which
basically contains all key-value mappings that have been used. As a
consequence if the item at position p is checked and unchecked, the
returned SparseBooleanArray will contain a (p, false) mapping.

Another option could be to delete all keys having a false value.

Change-Id: I15f8fc2a1ba3f1501af126c272b827402cfd8b14
core/java/android/widget/AbsListView.java