Forum Xamarin.Android

How to change an attribute of an item in a ListView.

I have a simple ListView of text items.

It is built as follows:
` view = FindViewById(Resource.Id.list);
view.Adapter = new ArrayAdapter(this, Android.Resource.Layout.SimpleListItem1, items);

        view.TextFilterEnabled = true;   
        view.Clickable = true;     
        view.FastScrollEnabled = true;
        view.ChoiceMode = ChoiceMode.Single;

        view.ItemClick += (object sender, AdapterView.ItemClickEventArgs args) 
                   => ItemClicked(sender, args);`

Right after this I want to change the background color of item 5 as an example.

I know how to do it in the ItemClick code but I just can't find a way to do it outside that.

Any thoughts?


Sign In or Register to comment.