The XML properties of the view component

Source: Internet
Author: User

The core Class View class for the view system in Android:

No nonsense, straight start (the related method in parentheses):

(1) Android:alpha[setalpha (float)] Sets the view font transparency.

(2) Android:background[setbackgroundresource (int)] set the background picture.

(3) android:onclick[] Set the response function for the Click event

(4) Android:contentdescription[setcontentdescription (charsequence)] Set the View content description

(5) Android:clickable[setclickble (Boolean)] set whether the view can be clicked

(6) android:drawingcachequality[setdrawingcachequality (int)] Set the translucent drawing quality (optional: Auto,high,low, memory consumption from high to low)

(7) android:duplicateparentstate[] Whether the drawing state is obtained directly from the parent class (click, Focus) (true or false)

(8) android:fadescrollbars[setscrollbarfadingenabled (Boolean)] when scroll bar is not used, whether to hide

(9) Android:fadingedgelength[getverticalfadingedgelength ()] Set the width of the border gradient

Whether the touch event is filtered when the android:filtertoucheswhenobscured[setfiltertoucheswhenobscured (Boolean) view is obscured

(one) Android:fitssystemwindows[setfitssystemwindows (Boolean)] whether to consider the system window when setting layout adjustments

Android:focusable[setfocusable (Boolean)] Sets whether the view is the focus

Android:focusableintouchmode[setfocusableintouchmode (Boolean)] set in touch mode, whether the view is the focus

Android:hapticfeedbackenabled[sethapticfeedbackenable (Boolean)] set whether to accept tactile feedback events

(android:id[setid) (int)] Set the view identity

(+) android:importantforaccessibility[setimportforaccessibility (int)]

Android:isscrollcontainer[setscrollcontainer (Boolean)] sets whether to be a scrolling container

Android:keepscreenon[setkeepscreenon (Boolean)] Sets whether the view is awake when it is visible

(+) Android:layertype[setlayertype (int, Paint)]

Android:layoutdirection[setlayoutdirection (int)] Sets the direction when the layout is drawn (0,1,2,3 is divided from left to right, right to left, inherited from parent class, and adaptive to local)

(in) Android:longclickable[setlongclickable (Boolean)] Sets whether the view corresponds to a long press event

(+) android:minheight[setminimumheight (int)] Set the minimum height of the view

(+) android:minwidth[setminimumwidth (int)] Set the minimum width of the view

(Android:nextfocusdown)

(Android:nextfocusforward)

(Android:nextfocusleft)

(Android:nextfocusright)

(PNS) Android:nextfocusup

(+) Android:padding[setpaddingrelative (Int,int,int,int)] (38) ~ (44) Set the margin

(android:paddingbottom[setpaddingrelative) (Int,int,int,int)]

(android:paddingend[setpadding) (Int,int,int,int)]

(android:paddingleft[setpadding) (Int,int,int,int)]

(android:paddingright[setpadding) (Int,int,int,int)]

(+) Android:paddingstart[setpaddingrelative (Int,int,int,int)]

(android:paddingtop[setpaddingrelative) (Int,int,int,int)]

Android:requiresfadingedge[setverticalfadingedgeenabled (Boolean)] sets whether to draw a vertical scroll bar

(+) Android:rotation[setrotation (float)] Rotate view

Android:rotationx[setrotationx (float)] Rotate the view with the x-axis

Android:rotationy[setrotationy (float)] Rotate the view in the Y axis

(andorid:saveenabled[setsaveenable) When the view freezes when the state is automatically saved

() Android:scalex[setscalex (float)] Set the Zoom datum point in the x direction

(Wuyi) Android:scaley[setscaley (float)] Set the scaling datum point in the y direction

(ANDROID:SCROLLX)

(android:scrolly)

Android:scrollbaralwaysdrawhorizontaltrack set whether horizontal scroll bars are always displayed

Android:scrollbaralwaysdrawverticaltrack sets whether vertical scroll bars are always displayed

(Android:scrollbardefaultdelaybeforefade[setscrollbardefaultdelaybeforefade) set scrollbar (int) to fade out (hide) after n milliseconds

Android:scrollbarfadeduration[setscrollbarfadeduration (int)] Set the scroll bar fade out mode

(android:scrollbarsize[setscrollbarsize) (int)]

Android:scrollbarstyle[setscrollbarstyle (int)] Sets the style and position of the scroll bar

Android:scrollbarthumbhorizontal set the background picture when the horizontal scroll bar is pressed

Android:scrollbarthumbvertical set the background picture when the vertical scroll bar is pressed

(android:scrollbartrackhorizontal) Set the background picture when the horizontal scroll bar is scrolled

(android:scrollbartrackvertical) Set the background picture when the vertical scroll bar is scrolled

(Android:scrollbars)

(+) android:soundeffectsenabled[setsoundeffectsenabled (Boolean)] set whether there is a sound effect when tapping or touching

(Android:tag)

(android:textalignment[settextalignment) (int)] Set the text alignment

(android:textdirection[settextdirection) (int)] Sets the direction in which text is drawn

Android:transformpivotx[setpivotx (float)] rotate and scale around point x (x-axis)

Android:transformpivoty[setpivoty (float)] rotates and scales around point x (in y-axis)

(Android:translationx[settranslationx) (float)]

(android:translationy[settranslationy) (float)]

android:visibility[setvisibility (int)] Set view visibility

The XML properties of the view component

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.