■ViewGroup容器
1.概述:ViewGroup仿佛是个容器。
2.功能:里面可添加子控件并处理子控件布局。
3.其的属性:
layout_marginBottom 底边向外留空距离 setMargins(int,int,int,int)
layout_marginLeft 左边向外留空距离
layout_marginRight 右边向外留空距离
layout_marginTop 顶边向外留空距离
4.其子控件的属性:—— 属性值:wrap_content / match_parent / fill_parent
layout_width 子控件布局宽度
layout_height 子控件布局高度
5.ViewManger接口:ViewGroup抽象类对其具体实现3个方法:
方法(1).添加子控件addView(...)
方法(2).移除子控件remove(...)
方法(3).更新子控件UpdateViewLayout(...)
1.概述:ViewGroup仿佛是个容器。
2.功能:里面可添加子控件并处理子控件布局。
3.其的属性:
layout_marginBottom 底边向外留空距离 setMargins(int,int,int,int)
layout_marginLeft 左边向外留空距离
layout_marginRight 右边向外留空距离
layout_marginTop 顶边向外留空距离
4.其子控件的属性:—— 属性值:wrap_content / match_parent / fill_parent
layout_width 子控件布局宽度
layout_height 子控件布局高度
5.ViewManger接口:ViewGroup抽象类对其具体实现3个方法:
方法(1).添加子控件addView(...)
方法(2).移除子控件remove(...)
方法(3).更新子控件UpdateViewLayout(...)