librelist archives

« back to archive

Setting LayoutParams in Code

Setting LayoutParams in Code

From:
Christopher Saunders
Date:
2011-12-11 @ 23:43
Hi,

I have a LinearLayout where I'd like to programatically adjust it's
LayoutParameters, primarily, it's margins.

This is the code I have:
https://gist.github.com/1463537

But when I go to load the screen the app just crashes with the included log
statement claiming that there's a class cast exception (which makes no
sense to me). Any ideas?

-- 
Christopher Saunders
http://christophersaunders.ca/