CheckedListView sparse boolean array

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


Sponsored Links
 Hi,

I am trying to use the
android.R.layout.simple_list_item_multiple_choice, with
CHOICE_MODE_MULTIPLE.
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++){
                    if(positions.get(k)){
                        selected[j++]=items[k];
                    }

                }


Please let me know..
Thanks
Raqeeb

--



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. Unlock Screen

Hi,

I'm trying to test my App in several resolutions and screens
densities, so I
managed to create some non standard AVD configurations, like 240x400
resolution with screen density of 120dpi. By doing this the emulator
shows
only the screen and not the skin with the fake "hardware" keyboard.
The
problem is that the emulator starts with the screen locked and I'm
unable to
unlock it doing to the lack of the "Menu" key.

Questions:

1) Is possible to start the emulator and pass through the lock screen?

2) There is a key combination (in the computers keyboard) that I can
use to
unlock the screen? (I'm using an Apple machine).

3) There is a way to configure non standard resolutions and still has
the
emulator skin shown?

Thanks in advance.

-- 

2. help test my game engine

here is my game engine demo, require android 2.1 or higher

download from android market, search "cocos2d" or "wiengine"

view by cyrket
http://www.cyrket.com/p/android/com.wiyun.engine/

I don't have enough device, so glad to hear some result from different rom,
different model, different brand, etc.

-- 

3. Cara Memperbesar Internal Storage /Resize NAND Partition

4. Happy Birthday id-android

5. OOT: ada yang mau ke IndoCommtech sore ini?

6. Task29, SD flash on HD2 but no succsess, do i need a goldcard ? no other ways...

7. Ready Stock Case/Screen Protec Samsung Galaxy S dan Screen Protec Galaxy Ta