Layoutparams
The LayoutParams is a helper class that stores various layout information related to the Android view for which it is used.
Viewgroup
ViewGroup is a subclass of the Android View class(parent of all Android graphical widgets) which can contain child views.
Others
Example |
---|
Unless you know exactly what you are doing do not use the same layoutparams for more than one viewgroup from question Programmatic Margin for LinearLayout is ignored |
The takeaway from this is that layoutparams are not parsed by the view s constructor they re parsed by another step that your code above isn t doing;the layoutinflater involves the parent viewgroup s generatelayoutparams method. from question Error applying image style dynamically, why? |