ViewGroup.MarginLayoutParams
原文地址:http://blog.csdn.net/wcs542882916
/**
* Per-child layoutinformation for layouts that support margins.
* See
* {@linkandroid.R.styleable#ViewGroup_MarginLayout ViewGroup Margin Layout Attributes}
* for a list of all child view attributes that this class supports.
*/
/* 每个子布局的布局信息,子布局是要支持margin(外边距)属性的。
*
* android.R.styleable.ViewGroup_MarginLayouts是这个类所支持的子控件的一个属性列表,子控件拥有这些属性
*
* 它继承于 ViewGroup.LayoutParams(只有宽高属性,宽高是包含padding的,即包含内边距)
*/
public static class MarginLayoutParamsextends ViewGroup.LayoutParams {
/**
* The left margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/*
* 子控件的左外边距,单位是像素
*/
@ViewDebug.ExportedProperty(category="layout")
public int leftMargin;
/**
* The top margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/*
* 上外边距
*/
@ViewDebug.ExportedProperty(category="layout")
public int topMargin;
/**
* The right margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/*
* 右外边距
*/
@ViewDebug.ExportedProperty(category="layout")
public int rightMargin;
/**
* The bottom margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/*
* 下外边距
*/
@ViewDebug.ExportedProperty(category="layout")
public int bottomMargin;
/**
* The start margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/* 起始外边距
* 默认是 DEFAULT_MARGIN_RELATIVE
*/
@ViewDebug.ExportedProperty(category="layout")
private int startMargin= DEFAULT_MARGIN_RELATIVE;
/**
* The end margin in pixels of the child.
* Call {@linkViewGroup#setLayoutParams(LayoutParams)} after reassigning a new value
* to this field.
*/
/* 末尾外边距
* 默认是 DEFAULT_MARGIN_RELATIVE
*/
@ViewDebug.ExportedProperty(category="layout")
private int endMargin= DEFAULT_MARGIN_RELATIVE;
/**
* The default start and end margin.
* @hide
*/
/* 默认的起始和末尾外边距
* -2147483648 (0x80000000)
*/
public static final int DEFAULT_MARGIN_RELATIVE= Integer.MIN_VALUE;
/**
* Bit 0: layout direction
* Bit 1: layout direction
* Bit 2: left margin undefined
* Bit 3: right margin undefined
* Bit 4: is RTL compatibilitymode
* Bit 5: need resolution
*
* Bit 6 to 7 not used
*
* @hide
*/
@ViewDebug.ExportedProperty(category="layout",flagMapping = {
@ViewDebug.FlagToString(mask=LAYOUT_DIRECTION_MASK,
equals = LAYOUT_DIRECTION_MASK,name ="LAYOUT_DIRECTION"),
@ViewDebug.FlagToString(mask=LEFT_MARGIN_UNDEFINED_MASK,
equals = LEFT_MARGIN_UNDEFINED_MASK,name ="LEFT_MARGIN_UNDEFINED_MASK"),
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
