I created my own Layout, let's callit MyLayout and the corresponding
LayoutParams class: MyLayout.LayoutParams.
But when I am inflating my view from XML, it creates the child views
using ViewGroup.LayoutParams instead of MyLayout.LayoutParams.
Obviously, I am missing something in the XML
You need to override the method generateLayoutParams():
http://developer.android.com/reference/android/view/ViewGroup.html#generateLayoutParams(android.util.AttributeSet)
and checkLayoutParams():
Hi,
I have created a custom ViewGroup and would like to have a custom
LayoutParams together with it so I can assign these to the children
through the XML.
I have created a custom LayoutParams class and added the following to
my attrs.xml:
declare-styleable name=LayoutParams
attr
3 matches
Mail list logo