How to put items in a Listview

Asked

Viewed 344 times

1

The method add doesn’t show up, I’m new so I have no idea what it could be

   protected override void OnCreate(Bundle bundle)
    {
        base.OnCreate(bundle);

        // Set our view from the "main" layout resource
        SetContentView(Resource.Layout.Main);

        ListView lista = FindViewById<ListView>(Resource.Id.listView1);
        lista.Add();

    }
  • Did Matheus solve his problem with the answer? Or do you need some more information?

2 answers

1

The class ListView has no method Add. You first need to create a List or ArrayList so that you can list inside your ListView.

1

Browser other questions tagged

You are not signed in. Login or sign up in order to post.