Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How to work with checkboxes and listAdapters, box are crazy!!!

$
0
0

I created a listview that contains checkboxes and when i mark one and roll a lot of them are marked and i dont know why, and they keep changing when i roll its weird probably because of the re-using of the cells or something... Here is my code.

                public override View GetView(int position, View convertView, ViewGroup parent)
        {
            var item = items [position];
            View view = convertView;
            if (view == null) // no view to re-use, create new
            view = context.LayoutInflater.Inflate (Resource.Layout.rowObs, null);
            var checkbox = view.FindViewById<CheckBox> (Resource.Id.checkBox);
            checkbox.Text = item.Nome;
            return view;
        }

Its really simple but its not working i just want a way for me to mark the checkbox roll and when i roll back it is still marked and working any tips?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>