Try refreshing view by

     list.Invalidate()

after making changes to it.

Also, try to do anything that updates the display in the main ui thread.

You can do this by running your code in the following curly brackets

     RunOnUi( () => { ... } );


On Fri, Oct 5, 2012 at 1:55 PM, Matteo Polito <map...@gmail.com> wrote:

> Hi guys, I'me becoming mad. I can't pre-select (hightlight) a row of a
> listview. I've tried everything I've found on internet but nothing work.
>
> Attached there is a simple solution.
>
> Someone knows how to solve this problem. Thanks.
>
> Thanks!!!!!
>
> This is my code: var items = new string []{"Row 1", "Row 2", "Row 3", "Row
> 1", "Row 2", "Row 3", "Row 1", "Row 2", "Row 3", "Row 1", "Row 2", "Row 3",
> "Row 1", "Row 2", "Row 3", "Row 1", "Row 2", "Row 3", "Row 1", "Row 2",
> "Row 3", "Row 1", "Row 2", "Row 3"};
>
>         var ListAdapter = new ArrayAdapter<String> (this, 
> Android.Resource.Layout.SimpleListItem1, items);
>
>         ListView list = FindViewById(Resource.Id.listView1) as ListView;
>
>         list.Adapter = ListAdapter;
>         list.SetSelection(5);
>         list.Selected = true;
>         list.RequestFocus();
>
>
> _______________________________________________
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to