ViewGroup.layout(int l, int t, int r, int b)四个输入参数的含义
2014-04-18 17:23
330 查看
ViewGroup.layout(int l, int t, int r, int b)这个方法是确定View的大小和位置的,然后将其绘制出来,里面的四个参数分别是View的四个点的坐标,他的坐标不是相对屏幕的原点,而且相对于他的父布局来说的,
如上图所示:
l 和 t 是控件左边缘和上边缘相对于父类控件左边缘和上边缘的距离
r 和 b是空间右边缘和下边缘相对于父类控件左边缘和上边缘的距离
相关文章推荐
- ViewGroup.layout(int l, int t, int r, int b)四个输入参数的含意
- ViewGroup.layout(int l, int t, int r, int b)四个输入参数的含意
- View中layout(int l, int t, int r, int b)方法的理解
- Android layout(int ,int,int,int)四个参数含义
- 关于LayoutInflater类inflate(intresource, ViewGroup root, boolean attachToRoot)方法三个参数的含义
- 编写四个重载函数Double(x),返回值为输入参数的两倍;参数类型分别为int,long,float,double,返回值类型与参数类型一致。
- LayoutInflater.inflate()方法的ViewGroup参数问题
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- public View getView(int position, View convertView, final ViewGroup parent)三个参数的意思
- 自定义View中,四个参数的构造函数,其最后两个参数的含义
- 关于LayoutInflater.inflater(int resId,ViewGroup root,boolean attchtoroot)第三个参数的问题
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- Android LayoutInflater.inflate(int resource, ViewGroup root, boolean attachToRoot)的参数理解
- 关于LayoutInflater类inflate(intresource, ViewGroup root, boolean attachToRoot)方法三个参数的含义
- 自定义ViewGroup应如何去使用setMeasuredDimsion(int,int)和计算其参数
- Android学习笔记之LayoutInflater的inflate方法中的ViewGroup root 参数理解
- 没有为类型 ViewGroup.LayoutParams 定义方法 setMargins(int, int, int)
- 覆写onLayout进行layout,含自定义ViewGroup例子
- ViewGroup measure layout