com.google.android.maps
Class MapView.LayoutParams

java.lang.Object
  extended by android.view.ViewGroup.LayoutParams
      extended by com.google.android.maps.MapView.LayoutParams
Enclosing class:
MapView

public static class MapView.LayoutParams
extends android.view.ViewGroup.LayoutParams

Per-child layout information associated with MapView. Child views can be laid out either positioned with respect to the MapView (MODE_VIEW), or positioned with respect to the map that is being displayed by the MapView (MODE_MAP).

See Also:
In addition, each child view can be aligned relative to its position., alignment

Field Summary
 int alignment
          Placement of child relative to the location.
static int BOTTOM
          Horizontal alignment: Align bottom.
static int BOTTOM_CENTER
          Alignment: Align to bottom vertically, center horizontally.
static int CENTER
          Alignment: Align center in both dimensions.
static int CENTER_HORIZONTAL
          Horizontal alignment: Align center horizontally.
static int CENTER_VERTICAL
          Vertical alignment: Align center vertically.
static int LEFT
          Horizontal alignment: Align left.
 int mode
          The layout mode.
static int MODE_MAP
          Layout mode: map relative.
static int MODE_VIEW
          Layout mode: map view relative.
 GeoPoint point
          The location of the child on the map.
static int RIGHT
          Horizontal alignment: Align right.
static int TOP
          Vertical alignment: Align top.
static int TOP_LEFT
          Alignment: Align to top left.
 int x
          The x location of the child relative to the view.
 int y
          The y location of the child relative to the view.
 
Fields inherited from class android.view.ViewGroup.LayoutParams
FILL_PARENT, height, layoutAnimationParameters, MATCH_PARENT, width, WRAP_CONTENT
 
Constructor Summary
MapView.LayoutParams(android.content.Context c, android.util.AttributeSet attrs)
          Creates a new set of layout parameters.
MapView.LayoutParams(int width, int height, GeoPoint point, int alignment)
          Creates a new set of layout parameters with the specified width, height and location.
MapView.LayoutParams(int width, int height, GeoPoint point, int x, int y, int alignment)
          Creates a new set of layout parameters with the specified width, height and location.
MapView.LayoutParams(int width, int height, int x, int y, int alignment)
          Creates a new set of layout parameters with the specified width, height and location.
MapView.LayoutParams(android.view.ViewGroup.LayoutParams source)
          
 
Method Summary
 java.lang.String debug(java.lang.String output)
           
 
Methods inherited from class android.view.ViewGroup.LayoutParams
onDebugDraw, onResolveLayoutDirection, setBaseAttributes, sizeToString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_MAP

public static final int MODE_MAP
Layout mode: map relative. The child view's position will change when the map scrolls or zooms.

See Also:
point, Constant Field Values

MODE_VIEW

public static final int MODE_VIEW
Layout mode: map view relative. The child view's position will stay fixed relative to the parent view, and will not move when the map scrolls or zooms.

See Also:
x, y, Constant Field Values

mode

public int mode
The layout mode.

See Also:
MODE_MAP, MODE_VIEW

point

public GeoPoint point
The location of the child on the map. Used when mode == MODE_MAP.


x

public int x
The x location of the child relative to the view. Used when mode == MODE_VIEW


y

public int y
The y location of the child relative to the view. Used when mode == MODE_VIEW


alignment

public int alignment
Placement of child relative to the location. Similar to the Gravity class, except the alignment is relative to a point rather than an enclosing rectangle. You can or-together horizontal and vertical alignment to create a complete alignment specification, or you can use one of the predefined specifications TOP_LEFT , CENTER or BOTTOM_CENTER.

See Also:
LEFT, RIGHT, TOP, BOTTOM, CENTER_HORIZONTAL, CENTER_VERTICAL, CENTER, TOP_LEFT, BOTTOM_CENTER

LEFT

public static final int LEFT
Horizontal alignment: Align left.

See Also:
alignment, Constant Field Values

RIGHT

public static final int RIGHT
Horizontal alignment: Align right.

See Also:
alignment, Constant Field Values

TOP

public static final int TOP
Vertical alignment: Align top.

See Also:
alignment, Constant Field Values

BOTTOM

public static final int BOTTOM
Horizontal alignment: Align bottom.

See Also:
alignment, Constant Field Values

CENTER_HORIZONTAL

public static final int CENTER_HORIZONTAL
Horizontal alignment: Align center horizontally.

See Also:
alignment, Constant Field Values

CENTER_VERTICAL

public static final int CENTER_VERTICAL
Vertical alignment: Align center vertically.

See Also:
alignment, Constant Field Values

CENTER

public static final int CENTER
Alignment: Align center in both dimensions.

See Also:
alignment, Constant Field Values

TOP_LEFT

public static final int TOP_LEFT
Alignment: Align to top left. This is the way views are normally aligned, for example it's how they are aligned by (@link AbsoluteLayout}.

See Also:
alignment, Constant Field Values

BOTTOM_CENTER

public static final int BOTTOM_CENTER
Alignment: Align to bottom vertically, center horizontally. This is useful for views that look like pins or cartoon speech balloons.

See Also:
alignment, Constant Field Values
Constructor Detail

MapView.LayoutParams

public MapView.LayoutParams(int width,
                            int height,
                            GeoPoint point,
                            int alignment)
Creates a new set of layout parameters with the specified width, height and location. This constructor sets the mode member variable to (@link #MODE_MAP}, which means the child view will be laid out relative to the map that is displayed within the parent view.

Parameters:
width - The width, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels.
height - The height, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels.
point - The location of the child.
alignment - The alignment to use.
See Also:
alignment

MapView.LayoutParams

public MapView.LayoutParams(int width,
                            int height,
                            GeoPoint point,
                            int x,
                            int y,
                            int alignment)
Creates a new set of layout parameters with the specified width, height and location. This constructor sets the mode member variable to (@link #MODE_MAP}, which means the child view will be laid out relative to the map that is displayed within the parent view.

Parameters:
width - the width, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels
height - the height, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels
point - the location of the child on the map
x - the offset of the child in pixels from point
y - the offset of the child in pixels from point
alignment - the alignment to use
See Also:
alignment

MapView.LayoutParams

public MapView.LayoutParams(int width,
                            int height,
                            int x,
                            int y,
                            int alignment)
Creates a new set of layout parameters with the specified width, height and location. This constructor sets the mode member variable to MODE_VIEW, which means the child view will be laid out relative to the parent view.

Parameters:
width - The width, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels.
height - The height, either ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT or a fixed size in pixels.
x - The location of the child relative to the view.
y - The location of the child relative to the view.
alignment - The alignment to use.
See Also:
alignment

MapView.LayoutParams

public MapView.LayoutParams(android.content.Context c,
                            android.util.AttributeSet attrs)
Creates a new set of layout parameters. The values are extracted from the supplied attributes set and context.

Due to a limitation of the UI framework, it is not possible to define our own XML attribute, so we are limited to supporting the standard XML attributes we inherit from our parent class.

The XML attributes mapped to this set of layout parameters are:

Parameters:
c - The application environment.
attrs - The set of attributes from which to extract the layout parameters values.

MapView.LayoutParams

public MapView.LayoutParams(android.view.ViewGroup.LayoutParams source)

Defaults to mode MODE_VIEW and alignment TOP_LEFT.

Method Detail

debug

public java.lang.String debug(java.lang.String output)
Overrides:
debug in class android.view.ViewGroup.LayoutParams