0

I tried to use LayoutParams like set layout margins dynamically, but AbsListView.LayoutParams does not have a setMargins() function. I need to do this dynamically in the java, not using xml. Thanks

Community
  • 1
  • 1
MarcusH
  • 1,693
  • 2
  • 15
  • 20

1 Answers1

1

AbsListView.LayoutParams applies to the items in the list. You can cast to MarginLayout.LayoutParams for the list view itself, (depending on the ViewGroup it is in).

Greg Ennis
  • 14,917
  • 2
  • 69
  • 74