目錄 搜尋
android Manifest Manifest.permission Manifest.permission_group android.accessibilityservice AccessibilityService android.accounts Account android.app NotificationManager android.bluetooth BluetoothAdapter BluetoothClass BluetoothClass.Device BluetoothClass.Device.Major BluetoothClass.Service BluetoothDevice BluetoothServerSocket BluetoothSocket android.content SharedPreferences android.database.sqlite SQLiteCursorDriver SQLiteOpenHelper android.graphics Bitmap android.location LocationListener Geocoder GpsStatus GpsStatus.Listener GpsStatus.NmeaListener GpsSatellite android.media AudioFormat AsyncPlayer AudioRecord AudioRecord.OnRecordPositionUpdateListener ThumbnailUtils AudioManager android.net TrafficStats MailTo LocalSocket android.os AsyncTask AsyncTask.Status CountDownTimer Message MessageQueue HandlerThread android.text Html android.util JsonWriter android.view ContextMenu ContextMenu.ContextMenuInfo Display ViewManager View ViewStub ViewTreeObserver ViewParent WindowManager GestureDetector Gravity MenuInflater ScaleGestureDetector SoundEffectConstants android.view.inputmethod InputConnection InputMethod InputMethodSession BaseInputConnection InputMethodManager android.widget AbsListView AbsListView.LayoutParams AbsListView.OnScrollListener AbsListView.RecyclerListener AbsoluteLayout AbsoluteLayout.LayoutParams AbsSeekBar AbsSpinner AdapterView AdapterView.AdapterContextMenuInfo AdapterView.OnItemLongClickListener AdapterView.OnItemSelectedListener AdapterView.OnItemClickListener AnalogClock BaseAdapter BaseExpandableListAdapter Button CheckBox CheckedTextView Checkable Chronometer Chronometer.OnChronometerTickListener CompoundButton CompoundButton.OnCheckedChangeListener CursorAdapter CursorTreeAdapter DatePicker DatePicker.OnDateChangedListener DialerFilter DigitalClock EditText Filter Filter.FilterListener Filter.FilterResults ExpandableListAdapter ExpandableListView.OnChildClickListener ExpandableListView.OnGroupClickListener ExpandableListView.OnGroupCollapseListener ExpandableListView.OnGroupExpandListener Filterable Gallery Gallery.LayoutParams GridView GridLayout GridLayout.Alignment RadioGroup ImageView ImageView.ScaleType HorizontalScrollView ImageButton ImageSwitcher FilterQueryProvider ListAdapter ListView MediaController MultiAutoCompleteTextView MultiAutoCompleteTextView.CommaTokenizer MultiAutoCompleteTextView.Tokenizer QuickContactBadge RadioButton RatingBar RatingBar.OnRatingBarChangeListener RelativeLayout RemoteViews ResourceCursorAdapter ResourceCursorTreeAdapter Scroller ScrollView SearchView SearchView.OnCloseListener SearchView.OnQueryTextListener SearchView.OnSuggestionListener SeekBar SeekBar.OnSeekBarChangeListener SimpleAdapter SimpleAdapter.ViewBinder SimpleCursorAdapter SimpleCursorAdapter.CursorToStringConverter SimpleCursorAdapter.ViewBinder SimpleCursorTreeAdapter SimpleCursorTreeAdapter.ViewBinder SimpleExpandableListAdapter SlidingDrawer SlidingDrawer.OnDrawerCloseListener SlidingDrawer.OnDrawerOpenListener SlidingDrawer.OnDrawerScrollListener Spinner SpinnerAdapter WrapperListAdapter TabHost TabHost.TabSpec TextView TimePicker TimePicker.OnTimeChangedListener Toast TableLayout TableLayout.LayoutParams TableRow TableRow.LayoutParams TabWidget TextSwitcher ToggleButton TwoLineListItem VideoView ViewAnimator ViewFlipper ViewSwitcher ViewSwitcher.ViewFactory ZoomButtonsController ZoomButtonsController.OnZoomListener ZoomButton ZoomControls dalvik.system DexFile
文字


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.LayoutParamsXML属性

参数:

c 上下文环境.

attrs        从属性设置中提取布局参数值。

 

public AbsoluteLayout.LayoutParams(ViewGroup.LayoutParams source)

(译者注:根据ViewGroup.LayoutParams实例化布局参数,从源码可以看出:

 

公共方法

         public String  debug (String output)

返回设置的布局参数的字符串表示形式。

参数

output 用于内部表示的预置字符串

返回值

返回如下格式字符串:输出 + "ViewGroup.LayoutParams={ width=WIDTH, height=HEIGHT }"

 


上一篇: 下一篇: