- android
- android.accessibilityservice
- android.accounts
- android.content
- android.database.sqlite
- android.graphics
- android.location
- android.media
- android.net
- android.os
- android.text
- android.view
- android.view.inputmethod
- android.widget
- AbsListView
- AbsoluteLayout
- AbsSeekBar
- AbsSpinner
- AdapterView
- AnalogClock
- BaseAdapter
- BaseExpandableListAdapter
- Button
- CheckBox
- CheckedTextView
- Checkable
- Chronometer
- CompoundButton
- CursorAdapter
- CursorTreeAdapter
- DatePicker
- DialerFilter
- DigitalClock
- EditText
- Filter
- Filter.FilterListener
- Filter.FilterResults
- ExpandableListAdapter
- Filterable
- Gallery
- Gallery.LayoutParams
- GridView
- GridLayout
- RadioGroup
- ImageView
- HorizontalScrollView
- ImageButton
- ImageSwitcher
- FilterQueryProvider
- ListAdapter
- ListView
- MediaController
- QuickContactBadge
- RadioButton
- RatingBar
- RelativeLayout
- RemoteViews
- ResourceCursorAdapter
- ResourceCursorTreeAdapter
- Scroller
- ScrollView
- SearchView
- SeekBar
- SeekBar.OnSeekBarChangeListener
- SimpleAdapter
- SimpleCursorAdapter
- SimpleCursorTreeAdapter
- SimpleExpandableListAdapter
- SlidingDrawer
- Spinner
- SpinnerAdapter
- WrapperListAdapter
- TabHost
- TabHost.TabSpec
- TextView
- TimePicker
- Toast
- TableLayout
- TableRow
- TableRow.LayoutParams
- TabWidget
- TextSwitcher
- ToggleButton
- TwoLineListItem
- VideoView
- ViewAnimator
- ViewFlipper
- ViewSwitcher
- ZoomButtonsController
- ZoomButton
- ZoomControls
- dalvik.system
AbsoluteLayout.LayoutParams
AbsoluteLayout.LayoutParams
版本:Android 2.2 r1
public static class AbsoluteLayout.LayoutParams extends ViewGroup.LayoutParams
java.lang.Object
android.view.ViewGroup.LayoutParams
android.widget.AbsoluteLayout.LayoutParams
类概述
每个子元素布局信息与绝对布局相关联。参见绝对布局属性中该类所支持的子视图属性列表。(译者注: AbsoluteLayout 的这种“绝对”定位的布局方式和我们非常熟悉的 Windows 编程中的 Left 和 Top 设置 UI 元素的位置是基本一致的。)
字段
public int x
在 View Group 内部子元素中的 X 水平位置。
public int y
在 View Group 内部子元素中的 Y 垂直位置。
构造函数
public AbsoluteLayout.LayoutParams(int width, int height, int x, int y)
创建一个新的具有指定宽度、高度和位置的布局参数。
参数:
width MATCH_PARENT
, WRAP_CONTENT
或者固定大小的像素
height MATCH_PARENT
, WRAP_CONTENT
或者固定大小的像素
x 子元素的 X 位置
y 子元素的 Y 位置
public AbsoluteLayout.LayoutParams(Context c, AttributeSet attrs)
创建一组新的布局参数,通过上下文提取的相关属性值设置。XML 属性映射到这个布局参数设置如下:
· layout_x
: 子元素的 X 位置
· layout_y
: 子元素的 Y 位置
· 所有来自 ViewGroup.LayoutParams 的 XML 属性
参数:
c 上下文环境。
attrs 从属性设置中提取布局参数值。
public AbsoluteLayout.LayoutParams(ViewGroup.LayoutParams source)
(译者注:根据 ViewGroup.LayoutParams 实例化布局参数,从源码可以看出:
公共方法
public String debug (String output)
返回设置的布局参数的字符串表示形式。
参数
output 用于内部表示的预置字符串
返回值
返回如下格式字符串:输出 + "ViewGroup.LayoutParams={ width=WIDTH, height=HEIGHT }"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论