关于LayoutParams的疑问
此处为什么要覆盖generateLayoutParams()方法, 当前流式布局控件的父控件(RelativeLayout)布局参数不应该是RelativeLayout.LayoutParams 吗?
@Override
public LayoutParams generateLayoutParams(AttributeSet attrs)
{
return new MarginLayoutParams(getContext(), attrs);
}
此处为什么要覆盖generateLayoutParams()方法, 当前流式布局控件的父控件(RelativeLayout)布局参数不应该是RelativeLayout.LayoutParams 吗?
@Override
public LayoutParams generateLayoutParams(AttributeSet attrs)
{
return new MarginLayoutParams(getContext(), attrs);
}
2015-05-15
举报