CheckedListView sparse boolean array

by raqz » Thu, 22 Apr 2010 08:03:53 GMT

Sponsored Links

I am trying to use the
android.R.layout.simple_list_item_multiple_choice, with
The contents are being displayed all right. Even if I happen to select
the items starting from the first item then it works fine. But if in
case, I select the last item ONLY, the program doesnt store the name
in the array selected.
SparseBooleanArray positions;
positions = listView.getCheckedItemPositions();

                int j =0;
                selected = new String[size];

                for(int k =0; k < positions.size();k++){


Please let me know..


CheckedListView sparse boolean array

by raqz » Thu, 22 Apr 2010 10:03:13 GMT

 I got the answer for that, we need to increment the for loop till the
end of the list that was displayed.
the right code would be
SparseBooleanArray positions;


Sponsored Links

Other Threads

1. About the network connectivity management


I am studing android network connectivity management, for example, how does 
android detect the wifi connected and then how does android disable the 
GPRS(mobile) data connection?
Could anybody give me some reference documents or URL, or the direction of the 
related source code? 

Thank you very much!


2. Ralat: WTS: Desire + Milestone + Backflip + Legend

Maaf saya edit..
Lupa harus android only..:(

Selamat pagi,
Saya mau jual gadget sbb:
- htc desire bnib
- motorola milestone bnib
- motorola backflip bnib
- htc legend bnib

Minat japri ke:
Thanks mods...


"Indonesian Android Community [id-android]" 

3. Changing text color of a substring drawed in a text view.

4. Finishing Browser

5. How can I know if OpenGl has drawn something?

6. Contribute to Android

7. Android Browser debug question