Absolute布局:
组件的位置可以准确的指定在屏幕的x/y坐标位置
虽然可以精确的去规定坐标,但是不建议使用。因为不同的设备 不同的分辨率的手机移动设备上不能很好的显示应有的效果
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" >
运行结果如下:

layout_x和layout_y属性:可以设置具体的x/y坐标
代码如下:
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > android:layout_width="wrap_content" android:layout_height="fill_parent" android:text="Button1" android:layout_x="100dp" /> android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="button2" android:layout_y="100dp" />
运行如下:
