English | Site Directory

Android - An Open Handset Alliance Project

android.widget
public class

android.widget.RelativeLayout

java.lang.Object
android.view.View Drawable.Callback KeyEvent.Callback
android.view.ViewGroup ViewManager ViewParent
android.widget.RelativeLayout

A Layout where the positions of the children can be described in relation to each other or to the parent. For the sake of efficiency, the relations between views are evaluated in one pass, so if view Y is dependent on the position of view X, make sure the view X comes first in the layout.

Also see RelativeLayout.LayoutParams for layout attributes

Nested Classes
RelativeLayout.LayoutParams Per-child layout information associated with RelativeLayout. 
Known Direct Subclasses

Summary

XML Attributes inherited from class android.view.ViewGroup
XML Attributes inherited from class android.view.View

Constants

      Value  
int  ALIGN_BASELINE    0x00000004 
int  ALIGN_BOTTOM    0x00000008 
int  ALIGN_LEFT    0x00000005 
int  ALIGN_RIGHT    0x00000007 
int  ALIGN_TOP    0x00000006 
int  ALIGN_WITH_PARENT_BOTTOM    12  0x0000000c 
int  ALIGN_WITH_PARENT_LEFT    0x00000009 
int  ALIGN_WITH_PARENT_RIGHT    11  0x0000000b 
int  ALIGN_WITH_PARENT_TOP    10  0x0000000a 
int  CENTER_HORIZONTAL    14  0x0000000e 
int  CENTER_IN_PARENT    13  0x0000000d 
int  CENTER_VERTICAL    15  0x0000000f 
int  POSITION_ABOVE    0x00000002 
int  POSITION_BELOW    0x00000003 
int  POSITION_TO_LEFT    0x00000000 
int  POSITION_TO_RIGHT    0x00000001 
int  TRUE    -1  0xffffffff 
Constants inherited from class android.view.ViewGroup
Constants inherited from class android.view.View
Fields inherited from class android.view.ViewGroup
Fields inherited from class android.view.View

Public Constructors

          RelativeLayout(Context context)
          RelativeLayout(Context context, AttributeSet attrs, Map inflateParams)
          RelativeLayout(Context context, AttributeSet attrs, Map inflateParams, int defStyle)

Public Methods

        LayoutParams  generateLayoutParams(AttributeSet attrs)
        int  getBaseline()

Return the offset of the widget's text baseline from the widget's top boundary.

Protected Methods

        boolean  checkLayoutParams(LayoutParams p)
        void  onLayout(boolean changed, int l, int t, int r, int b)
Called from layout when this view should assign a size and position to each of its children.
        void  onMeasure(int widthMeasureSpec, int heightMeasureSpec)

Measure the view and its content to determine the measured width and the measured height.

Methods inherited from class android.view.ViewGroup