Excerpt from the first line of code
Relativelayout, also known as relative layout, is a very common layout. LinearLayout and the arrangement of the rules
is different, relativelayout is more casual, it can be relatively positioned to make the control appear in the layout
of any location.
<?XML version= "1.0" encoding= "Utf-8"?><Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" > <ButtonAndroid:id= "@+id/button1"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentleft= "true"Android:layout_alignparenttop= "true"Android:text= "Button 1" /> <ButtonAndroid:id= "@+id/button2"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentright= "true"Android:layout_alignparenttop= "true"Android:text= "button 2" /> <ButtonAndroid:id= "@+id/button3"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"android:layout_centerinparent= "true"Android:text= "button 3" /> <ButtonAndroid:id= "@+id/button4"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentbottom= "true"Android:layout_alignparentleft= "true"Android:text= "button 4" /> <ButtonAndroid:id= "@+id/button5"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentbottom= "true"Android:layout_alignparentright= "true"Android:text= "button 5" /> </Relativelayout>
Android Note: relativelayout