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

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

$
0
0

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?

Regards, Jim


Viewing all articles
Browse latest Browse all 204402

Trending Articles



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