> I have a list view which contains some 20 odd items along with a check
> box. Now when iam trying to delete an item by checking its checkbox,
> iam getting NullPointerException at below written code:
>
> CheckBox cbox= (CheckBox) view.getChildAt(j).findViewById
> (R.id.alarmCheck);
>
> here  view.getChildAt(j) comes null.
> Now if I have six elements in this ViewList, which are visible on the
> emulator, then the same code just works fine.
> Problem arises when the list is long and it starts scrolling and some
> element are not visible.
> I am working on this problem for some days, any help will be highly
> apperciated.

Rather than use your own checkboxes, I would use the built-in checklist in
ListView, as it will simplify what you are trying to accomplish.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



--~--~---------~--~----~------------~-------~--~----~
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