目录搜索
androidManifestManifest.permissionManifest.permission_groupandroid.accessibilityserviceAccessibilityServiceandroid.accountsAccountandroid.appNotificationManagerandroid.bluetoothBluetoothAdapterBluetoothClassBluetoothClass.DeviceBluetoothClass.Device.MajorBluetoothClass.ServiceBluetoothDeviceBluetoothServerSocketBluetoothSocketandroid.contentSharedPreferencesandroid.database.sqliteSQLiteCursorDriverSQLiteOpenHelperandroid.graphicsBitmapandroid.locationLocationListenerGeocoderGpsStatusGpsStatus.ListenerGpsStatus.NmeaListenerGpsSatelliteandroid.mediaAudioFormatAsyncPlayerAudioRecordAudioRecord.OnRecordPositionUpdateListenerThumbnailUtilsAudioManagerandroid.netTrafficStatsMailToLocalSocketandroid.osAsyncTaskAsyncTask.StatusCountDownTimerMessageMessageQueueHandlerThreadandroid.textHtmlandroid.utilJsonWriterandroid.viewContextMenuContextMenu.ContextMenuInfoDisplayViewManagerViewViewStubViewTreeObserverViewParentWindowManagerGestureDetectorGravityMenuInflaterScaleGestureDetectorSoundEffectConstantsandroid.view.inputmethodInputConnectionInputMethodInputMethodSessionBaseInputConnectionInputMethodManagerandroid.widgetAbsListViewAbsListView.LayoutParamsAbsListView.OnScrollListenerAbsListView.RecyclerListenerAbsoluteLayoutAbsoluteLayout.LayoutParamsAbsSeekBarAbsSpinnerAdapterViewAdapterView.AdapterContextMenuInfoAdapterView.OnItemLongClickListenerAdapterView.OnItemSelectedListenerAdapterView.OnItemClickListenerAnalogClockBaseAdapterBaseExpandableListAdapterButtonCheckBoxCheckedTextViewCheckableChronometerChronometer.OnChronometerTickListenerCompoundButtonCompoundButton.OnCheckedChangeListenerCursorAdapterCursorTreeAdapterDatePickerDatePicker.OnDateChangedListenerDialerFilterDigitalClockEditTextFilterFilter.FilterListenerFilter.FilterResultsExpandableListAdapterExpandableListView.OnChildClickListenerExpandableListView.OnGroupClickListenerExpandableListView.OnGroupCollapseListenerExpandableListView.OnGroupExpandListenerFilterableGalleryGallery.LayoutParamsGridViewGridLayoutGridLayout.AlignmentRadioGroupImageViewImageView.ScaleTypeHorizontalScrollViewImageButtonImageSwitcherFilterQueryProviderListAdapterListViewMediaControllerMultiAutoCompleteTextViewMultiAutoCompleteTextView.CommaTokenizerMultiAutoCompleteTextView.TokenizerQuickContactBadgeRadioButtonRatingBarRatingBar.OnRatingBarChangeListenerRelativeLayoutRemoteViewsResourceCursorAdapterResourceCursorTreeAdapterScrollerScrollViewSearchViewSearchView.OnCloseListenerSearchView.OnQueryTextListenerSearchView.OnSuggestionListenerSeekBarSeekBar.OnSeekBarChangeListenerSimpleAdapterSimpleAdapter.ViewBinderSimpleCursorAdapterSimpleCursorAdapter.CursorToStringConverterSimpleCursorAdapter.ViewBinderSimpleCursorTreeAdapterSimpleCursorTreeAdapter.ViewBinderSimpleExpandableListAdapterSlidingDrawerSlidingDrawer.OnDrawerCloseListenerSlidingDrawer.OnDrawerOpenListenerSlidingDrawer.OnDrawerScrollListenerSpinnerSpinnerAdapterWrapperListAdapterTabHostTabHost.TabSpecTextViewTimePickerTimePicker.OnTimeChangedListenerToastTableLayoutTableLayout.LayoutParamsTableRowTableRow.LayoutParamsTabWidgetTextSwitcherToggleButtonTwoLineListItemVideoViewViewAnimatorViewFlipperViewSwitcherViewSwitcher.ViewFactoryZoomButtonsControllerZoomButtonsController.OnZoomListenerZoomButtonZoomControlsdalvik.systemDexFile
文字


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 }"

 


上一篇:下一篇: