I'm having some trouble with Android's LayoutParams. Basically I am trying to create an application that is completely dynamic, with all layouts generated programmatically and practically nothing beyond my splash screen committed to XML. I am having some success using linear layouts, and the app is rendering everything that I want it to. I am just having some trouble with fine tuning the layouts. e.g. forcing my footer to the bottom of the screen, stretching button bars to cover the entire width, etc.
As far as I can tell, the way to achieve this programmatically is using the setLayoutParams method. My problem is that I am not sure how to get the information into the Layout Params. At the moment I am using the LinearLayout.LayoutParams (int width, int height) constructor, but I have not found a way of setting the parameters once it is created. Instead I would like to use the LinearLayout.LayoutParams (Context c, AttributeSet attrs) constructor, but I can't find the right way of declaring an AttributeSet.
Can anyone help me?