This is working correctly. ListView contains only the number of views
needed to fill the screen. Therefore you cannot access the views
outside of the screen since they do not exist.

On Sun, Feb 22, 2009 at 9:16 PM, Anonymous Anonymous
<[email protected]> wrote:
> Hi All,
>
> I m having  problem in setting soem items in list. getChildAt() returns null
> if its not in the visible area :(, is there any workaround for this?
>
>             for (int i = 1; i < getListView().getCount(); i++)
>             {
>                 mCheckBox =
> getListView().getChildAt(i).findViewById(R.id.check);
>                 mCheckBox.setVisibility(View.VISIBLE);
>                 Flag = true;
>             }
>
> Assume my list is having 8 items, it works fine for 6 items, but anything
> more 6 is a fail.
>
> Any help is appreciated...
> Thanks
>
> >
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to