The absolute layout is represented by AbsoluteLayout. Absolute layout is like the empty layout in java AWT programming. Android does not provide any layout control, but developers control the component Position through X and Y coordinates. When AbsoluteLayout is used as the layout container, the layout container no longer manages the position and size of child components-all of which must be controlled by developers themselves. In the absolute layout, each component can specify the following two XML attributes: layout_x: Specify the X coordinate of the component layout_y: Specify the Y coordinate of the component. Example: main. xml code 01 on the logon interface <? Xml version = "1.0" encoding = "UTF-8"?> 02 <AbsoluteLayout xmlns: android = "http://schemas.android.com/apk/res/android" 03 android: orientation = "vertical" 04 android: layout_width = "fill_parent" 05 android: layout_height = "fill_parent" 06> 0708 <! -- Define a text box and use absolute positioning --> 09 <TextView10android: layout_x = "20dip" 11 android: layout_y = "20dip" 12 android: layout_width = "wrap_content" 13 android: layout_height = "wrap_content" 14 android: text = "username:"/> 15 <! -- Define a text editing box and use absolute positioning --> 16 <EditText17android: layout_x = "80dip" 18 android: layout_y = "15dip" 19 android: layout_width = "wrap_content" 20 android: layout_height = "wrap_content" 21 android: width = "200px"/> 22 <! -- Define a text box and use absolute positioning --> 23 <TextView24android: layout_x = "20dip" 25 android: layout_y = "80dip" 26 android: layout_width = "wrap_content" 27 android: layout_height = "wrap_content" 28 android: text = "Password:"/> 29 <! -- Define a text editing box and use absolute positioning --> 30 <EditText31android: layout_x = "80dip" 32 android: layout_y = "75dip" 33 android: layout_width = "wrap_content" 34 android: layout_height = "wrap_content" 35 android: width = "200px" 36 android: password = "true"/> 37 <! -- Define a button and use absolute positioning --> 38 <Button39android: layout_x = "130dip" 40 android: layout_y = "135dip" 41 android: layout_width = "wrap_content" 42 android: layout_height = "wrap_content" 43 android: text = "login"/> 44 </AbsoluteLayout> java code: view sourceprint? 01 package com. nuaa. absolutelayout; 0203 import android. app. activity; 04 import android. OS. bundle; 0506 public class AbsoluteLayoutTest extends Activity {07 public void onCreate (Bundle savedInstanceState) {08super. onCreate (savedInstanceState); 09 setContentView (R. layout. main); 10} 1112}