1

Why does my ListView not show the items from a extern file?

I work with a LV Adapter, MainActivity, one axml for the ListView and toolbar and one axml for the Rows. The Main.cs reads a .csv from the Harddrive of a Mobile Phone. The Adapter contains the FindViewById method.

Can someone check what i forget or don't see?

[Activity(Label = "MyLter")]

1 Answers1

0

As @Programming Pirate said, you missed to give adapter to you ListView, after your creating new instance of MyLVAdapter: MyLVAdapter adapter = new MyLVAdapter(this, einsatzlist);, you missed:

einsatzListView.Adapter = adapter;
Grace Feng
  • 16,564
  • 2
  • 22
  • 45
  • @My_yz, I'm pulling my head against the wall, it's still the same question....Remove the `[Activity(Label = "MyLVAdapter")]` from your `MyLVAdapter`, it's an adapter, not an activity. Maybe you need try to understand each line of code. – Grace Feng Aug 30 '17 at 05:11
  • 1
    @My_yz, I finally found your problem............ `MyLVAdapter adapter = new MyLVAdapter(this, einsatzlist);`, you used `einsatzlist`, but you initialized a `einsatzList ` in `var einsatzList = new List();` , and your data are added into `einsatzList`, it's the caps issue............ – Grace Feng Aug 30 '17 at 05:55
  • @My_yz, yes, `MyLVAdapter adapter = new MyLVAdapter(this, einsatzlist);`, change the `einsatzlist` to `einsatzList`, and then add the code in my answer, it should work... If you solve this issue, please mark this answer, thx! – Grace Feng Aug 30 '17 at 06:05