Hello,
Any one knows why my ToggleButtons won't keep their states in a
ListView?
Each list item includes a ToggleButton - when scrolled off from the
screen their states are reset to unchecked...
I presume getView() is called once they're visible; however I'm not re
instantiating them anyways...
Thanks in advance
-------------------
public View getView(int position, View convertView, ViewGroup parent){
// inflated view here
final ToggleButton saveToggle =
(ToggleButton)view.findViewById(R.id.state_toggle_button);
saveToggle.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// save or unsave here //
}
});
return view;
}
--
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