-1

like some or many here i wan'T to know how i can set the height of an ListView programatically, but it seems, that no one had this issue with mono. I've seen some solutions for the normal Android, Java, but nothing for C# up to now. some of them was >this< or >this< one. in Mono for android, there is nothing like getLayoutParams() for a ListView, or something that sounds like it. so how can i set it's height attributeprogramatically?

Community
  • 1
  • 1
EaranMaleasi
  • 895
  • 1
  • 13
  • 32

1 Answers1

2

try this

ListView listAccounts = FindViewById<ListView>(Resource.Id.listAccounts);
listAccounts.LayoutParameters.Height = 200;
fattikus
  • 542
  • 1
  • 4
  • 15