Some property values for "Android" Android layout files

Source: Internet
Author: User

First Class: property value True or False
Android:layout_centerhrizontal Horizontal Center
Android:layout_centervertical Vertical Center
Android:layout_centerinparent is completely centered relative to the parent element
Android:layout_alignparentbottom snaps to the bottom edge of the parent element
Android:layout_alignparentleft snaps to the left edge of the parent element
Android:layout_alignparentright snaps to the right edge of the parent element
Android:layout_alignparenttop snaps to the top edge of the parent element
android:layout_alignwithparentifmissing if the corresponding sibling element cannot be found, then the parent element is the reference.
Android:layout_alignparentstart start close to parent element end position
Android:layout_alignparentend Close parent element End position
Android:animatelayoutchanges if the layout changes when there is an animation effect
Android:clipchildren defines whether a sub-layout must be within a defined area
Android:cliptopadding defines whether there is space between layouts
Android:animationcache Definition sub-layout also has animation effect
Android:alwaysdrawnwithcache defines whether a child layout applies a drawing's cache
Android:addstatesfromchildren define whether the layout applies a sub-layout background
Android:splitmotionevents define whether the layout passes touch events to child layouts
Android:focusableintouchmode defines if the focus can be acquired through touch
Android:isscrollcontainer defines whether a layout can be resized as a scroll container to adjust the entire form
Android:fadescrollbars scroll bar Auto-hide
Android:fitssystemwindows whether to consider system windows (such as status bar) when setting layout adjustments
Android:visibility define whether the layout is visible
Android:requiresfadingedge defines whether edges fade when scrolling
Android:clickable define whether you can click
Android:longclickable defines if a long click is possible
Android:saveenabled set whether the view data is saved when the window freezes (such as rotating the screen)
Whether the touch event is filtered when the android:filtertoucheswhenobscured window is obscured by other visible windows
Android:keepscreenon setting the screen to solid
Android:duplicateparentstate whether to get the drawing state from the parent container (cursor, press inferior)
android:soundeffectsenabled tap or touch to see if there is a sound effect
android:hapticfeedbackenabled Setting Tactile Feedback
Second class: The attribute value must be the reference name of the id "@id/idname"
Android:layout_alignbaseline the text of this element aligns with the parent element text
Android:layout_below at the bottom of an element
Android:layout_above at the top of an element
Android:layout_toleftof on the left side of an element
Android:layout_torightof on the right side of an element
Android:layout_tostartof This element starts with an element
Android:layout_toendof This element ends at an element
Android:layout_aligntop aligns the top edge of this element with the top edge of an element
Android:layout_alignleft aligns the left edge of this element with the left edge of an element
Android:layout_alignbottom aligns the bottom edge of this element with the bottom edge of an element
Android:layout_alignright aligns the right edge of this element with the right edge of an element
Android:layout_alignstart This element aligns with the beginning parent element
Android:layout_alignend This element aligns with the end parent element
Android:ignoregravity the specified element is not affected by gravity
Android:layoutanimation The animation that defines when the layout is displayed
Android:id adding IDs to layouts for easy search
Android:tag add tag for layout to find and similar
Android:scrollbarthumbhorizontal sets the drawable of the horizontal scroll bar.
Android:scrollbarthumbvertical Setting the drawable of the vertical scroll bar
Android:scrollbartrackhorizontal sets the color drawable of the horizontal scrollbar background (track)
Android:scrollbartrackvertical sets the color drawable of the vertical scrollbar background (track)
Android:scrollbaralwaysdrawhorizontaltrack set whether the horizontal scrollbar contains a track
Android:scrollbaralwaysdrawverticaltrack sets whether the vertical scrollbar contains a track
Android:nextfocusleft setting left specifies the view to get the next focus
Android:nextfocusright Setting the right side specifies the view to get the next focus
Android:nextfocusup setting the upper specified view to get the next focus
Android:nextfocusdown setting the specified view below to get the next focus
Android:nextfocusforward setting the specified view for the next focus
Android:contentdescription description
Android:onclick calls the specified method from the context when clicked
Class III: Attribute values are specific pixel values, such as 30DIP,40PX,50DP
Android:layout_width defines the width of this element
Android:layout_height defines the height of this element
Android:layout_margin the distance between the upper and lower left of this element
Android:layout_marginbottom distance from the bottom edge of an element
Android:layout_marginleft distance from the left edge of an element
Android:layout_marginright distance from the right edge of an element
Android:layout_margintop distance from the top edge of an element
Android:layout_marginstart the distance from the starting position in this element
Android:layout_marginend the distance from the end position in this element
Android:scrollx Horizontal Initial scrolling offset
android:scrolly Vertical Initial scrolling offset
Android:background background of this element
Android:padding specifying the spacing between layouts and sub-layouts
ANDROID:PADDINGLEFT Specifies the spacing between the left and child layouts of the layout
ANDROID:PADDINGTOP Specifies the spacing between the top of the layout and the child layout
android:paddingright Specifies the spacing between the right side of the layout and the child layout
Android:paddingbottom Specify the spacing between the bottom of the layout and the child layout
Android:paddingstart the spacing between the left and the child layout of the specified layout is the same as Android:paddingleft
Android:paddingend the spacing between the specified layout and the child layout is the same as Android:paddingright
Android:fadingedgelength setting the length of the border gradient
Android:minheight min. height
Android:minwidth min. width
Android:translationx moving distance in horizontal direction
Android:translationy movement distance in vertical direction
Android:transformpivotx deflection in the horizontal direction relative to a point
Android:transformpivoty deflection in the vertical direction relative to a point
class Fourth: Attribute values ask Android built-in values
Android:gravity how controls are laid out
Android:layout_gravity Layout method
Android:persistentdrawingcachehua defining the persistence of a drawing's cache
Android:descendantfocusability Control sub-layout focus get mode commonly used in ListView item contains multiple controls clicked invalid
Android:scrollbars to set the state of the scroll bar
Android:scrollbarstyle setting the style of the scroll bar
Android:fitssystemwindows whether to consider system windows (such as status bar) when setting layout adjustments
Android:scrollbarfadeduration Setting the scrollbar fade time
Android:scrollbardefaultdelaybeforefade sets the scrollbar to begin fading after n milliseconds, in milliseconds.
Android:scrollbarsize to set the scroll adjustment size
Android:fadingedge the gradient of the border when you set the pull scroll bar
Android:drawingcachequality to set translucent quality when drawing
Android:overscrollmode style when sliding to boundary
Android:alpha Setting transparency
Android:rotation Rotation degree
Android:rotationx Horizontal Rotation degree
Android:rotationy Vertical Rotation degree
Android:scalex setting X-axis Scaling
Android:scaley Setting the y-axis scaling
Android:verticalscrollbarposition the position of the vertical scroll bar of the camera
Android:layertype Setting support
Android:layoutdirection defining the orientation of layout sheets
Android:textdirection Defining Text Direction
Android:textalignment text Alignment
Android:importantforaccessibility important lines for setting up accessibility
Android:labelfor Adding tags

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.