Android Layout detailed

Source: Internet
Author: User

http://blog.163.com/zhangzheming_282/blog/static/117920962013072502787/absolutelayout--absolute layout must be set Android:layout_ x= "30px" android:layout_y= "50px" is generally not recommended with Framelayout ————stacked to show, the first added component is placed at the bottom, and finally added to the topmost layer in the frame to try to display, and the previous layer overrides the next layer of control. <ScrollView> scroll bar to wrap this in the space where the content is displayed-------add scrollbars <item android:drawable= "@[package:]drawable/drawable_ Resource "//Settings iconandroid:state_pressed=["true" false "//when the icon is pressedandroid:state_focused=["true" false "//when the icon is focused. android:state_selected=["true" false "//when the icon is selectedandroid:state_checkable=["true" false "//when the icon is selectableandroid:state_checked=[" true" false "//when the icon is selected android:state_enabled=["true" false "//when the icon is availableandroid:state_window_focused=["true" false "//When the icon window is focused/> relativelayout--relative layout properties   controls to control position android:layout_above--the control to the control on the ID android:layout_below-- Add the control to the ID of the control android:layout_toleftof--the control to the left android:layout_torightof--of the control to the ID, and the control to the right of the control to the ID control to align the relevant android: layout_alignbaseline--the control baseline aligns the baseline of the given ID   aligns the middle of the two controls android:layout_alignbottom--the control to the bottom of the control at the given ID android:layout_ alignleft--the control to the left of the control for the given ID android:layout_alignright--the control to the right of the control given the ID android:layout_aligntop-- Aligns the control at the top of the control at the given ID to the container android:alignparentbottom if true, aligns the bottom of the control with the bottom of the parent control android:layout_alignparentleft--if True, The control is located on the left side of the parent control android:layout_alignparentright--if true, the control is located at the right of the parent control android:layout_alignparenttop--if True, The control is at the top of the parent control android:layout_alignparentbottom--if true, the control is centered at the bottom of the parent control android:layout_centerhorizontal--if True, The control is placed in the horizontal center   horizontally centered  android:layout_centerlnparent--if true, the control is placed horizontally and vertically in the parent control Android:layout_ centervertical--If True, the control is placed vertically in the center         vertically centered android:layout_centerinparent     Fully centered relative to the parent element  android:layout_marginbottom &nbsP             The distance from the bottom edge of the parent control  android:layout_marginleft           &NB Sp       distance from the left edge of the parent control  android:layout_marginright                 away from the parent The distance from the right edge of the control  android:layout_margintop                   The distance from the top edge of the parent control  & nbsp The Tablelayout ———— is a tabular form of a child view element. tablerow--is similar to <tr> android:collapsecolumns= "0,1"--hides the defined column android:shrinkcolumns--shrinks the specified column to fit the screen, Do not extrude the screen android:stretchcolumns--try to fill the specified column with a blank part---------above is placed in the tablelayout inside the sub-label  android:layout_column-- The TableRow control is placed in the specified column android:layout_span--the number of columns that span the control---------above is placed in tablerow  android:gravity   The  android:gravity property is the qualification for the view content. For example, a button above the text.   You can set the text on the left side of the view, on the right and so on. Take the button as an example, android:gravity= "right" then the text on the button   android:layout_gravity  android:layout_ Gravity is used to set the position of the view relative to the parent view. For example, a button in the LinearLayout, you want to put the button on the left, right and other positions can be set by this property.Take button As an example, android:layout_gravity= "right" button on R   android:layout_alignParentRight   Aligns the right end of the current control with the right end of the parent control. This property value can only be true or FALSE, which is false by default. The difference between  padding and margin:  so padding is to define the distance between the control's own content and the edge of the control, padding has the meaning of filling the filler, and the margin is said to be outside the control's four edge distance, Refers to the distance from other controls, margin has edge, the page is left white meaning

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.