public static class MapView.LayoutParams
extends ViewGroup.LayoutParams
每个子视图与MapView关联的布局信息。
限定符和类型 | 字段和说明 |
---|---|
int |
alignment
子视图放置的对齐方式。
|
static int |
BOTTOM
水平对齐方式:底端对齐。
|
static int |
BOTTOM_CENTER
对齐方式:垂直方向上底端对齐,水平方向上居中对齐。
|
static int |
CENTER
对齐方式:水平和垂直方向上都是居中对齐。
|
static int |
CENTER_HORIZONTAL
水平对齐方式:水平方向向上居中对齐。
|
static int |
CENTER_VERTICAL
垂直对齐方式:垂直方向上居中对齐。
|
static int |
LEFT
水平对齐方式:左对齐。
|
int |
mode
布局模式
|
static int |
MODE_MAP
布局模式:相对于地图。
|
static int |
MODE_VIEW
布局模式:相对于地图视图。
|
Point2D |
point
子视图在地图上的位置。
|
static int |
RIGHT
水平对齐方式:右对齐。
|
static int |
TOP
垂直对齐方式:上对齐。
|
static int |
TOP_LEFT
对齐方式:左上方对齐。
|
int |
x
子视图相对于地图视图的x坐标位置。
|
int |
y
子视图相对于地图视图的y坐标位置。
|
构造器和说明 |
---|
MapView.LayoutParams(Context context, AttributeSet attrs)
构造函数。
|
MapView.LayoutParams(int width, int height, int x, int y, int alignment)
构造函数。
|
MapView.LayoutParams(int width, int height, Point2D point, int alignment)
构造函数。
|
MapView.LayoutParams(int width, int height, Point2D point, int x, int y, int alignment)
构造函数。
|
MapView.LayoutParams(ViewGroup.LayoutParams source)
构造函数。
|
public static final int BOTTOM
水平对齐方式:底端对齐。
public static final int CENTER_HORIZONTAL
水平对齐方式:水平方向向上居中对齐。
public static final int CENTER_VERTICAL
垂直对齐方式:垂直方向上居中对齐。
public static final int LEFT
水平对齐方式:左对齐。
public static final int RIGHT
水平对齐方式:右对齐。
public static final int TOP
垂直对齐方式:上对齐。
public static final int TOP_LEFT
对齐方式:左上方对齐。
public static final int CENTER
对齐方式:水平和垂直方向上都是居中对齐。
public static final int BOTTOM_CENTER
对齐方式:垂直方向上底端对齐,水平方向上居中对齐。
public static final int MODE_MAP
布局模式:相对于地图。当地图滚动或缩放时,子视图的位置就会改变。
public static final int MODE_VIEW
布局模式:相对于地图视图。子视图的位置相对于父视图保持不变,当地图滚动或缩放时不会移动。
public int alignment
子视图放置的对齐方式。
public int mode
布局模式
public Point2D point
子视图在地图上的位置。当模式为MODE_MAP时使用。
public int x
子视图相对于地图视图的x坐标位置。
public int y
子视图相对于地图视图的y坐标位置。
public MapView.LayoutParams(Context context, AttributeSet attrs)
构造函数。
context
-attrs
-public MapView.LayoutParams(ViewGroup.LayoutParams source)
构造函数。
source
-public MapView.LayoutParams(int width, int height, Point2D point, int alignment)
构造函数。
width
-height
-point
-alignment
-public MapView.LayoutParams(int width, int height, Point2D point, int x, int y, int alignment)
构造函数。
width
-height
-point
-x
-y
-alignment
-public MapView.LayoutParams(int width, int height, int x, int y, int alignment)
构造函数。
width
-height
-x
-y
-alignment
-