Android Layout Properties Daquan

Source: Internet
Author: User

Relativelayout First Class: attribute value istrue to false Android:layout_centerhrizontalCenter HorizontallyAndroid:layout_centerverticalCenter VerticallyAndroid:layout_centerinparentfully centered relative to parent elementAndroid:layout_alignparentbottomsnaps to the bottom edge of the parent elementAndroid:layout_alignparentleftsnaps to the left edge of the parent elementAndroid:layout_alignparentrightsnaps to the right edge of the parent elementAndroid:layout_alignparenttopsnaps to the top edge of the parent elementandroid:layout_alignwithparentlfmissing if the corresponding sibling element cannot be found, the parent element is the reference. Class II: The attribute value must be The reference name of the IDAndroid:layout_belowat the bottom of an elementAndroid:layout_aboveat the top of an elementAndroid:layout_toleftofon the left side of an elementAndroid:layout_torightofon the right side of an elementAndroid:layout_aligntopaligns the top edge of this element with the top edge of an elementAndroid:layout_alignleftaligns the left edge of this element with the left edge of an elementAndroid:layout_alignbottomaligns the bottom edge of this element with the bottom edge of an elementAndroid:layout_alignrightaligns the right edge of this element with the right edge of an elementClass III: Attribute values are specific pixels on duty, such as30dipAndroid:layout_marginbottomthe distance from the bottom edge of an elementAndroid:layout_marginleftthe distance from the left edge of an elementAndroid:layout_marginrightdistance from the right edge of an elementAndroid:layout_margintopthe distance from the top edge of an elementAndroid:hintset the prompt information to be entered when EditText is empty Android:gravityLimit the view content: Up or down Android:layout_gravity= "Right"to set the Container(component) left-to-right Android:textThe text displayed in the specified control uses the string in the String.xml file as much as possibleAndroid:textsizeText SizeAndroid:widthControl WidthAndroid:heightControl HeightAndroid:layout_widthSpecify the width of the Container component Android:layout_heightSpecify the height of the Container component Viewdivide space by scaleandroid:padding*Inner marginAndroid:singlelineIs true, the content is displayed in the same rowAndroid:scaletype:controls how the picture resized/moved to match the size of the ImageView Imageview.scaletype/android.scaletypethe meaning of the value difference:Center/centercentered on the original size of the picture , when the picture is longer than the width of the View , the center portion of the image is displayed Center_crop/centercropproportionally enlarges the size of the image so that the length of the image is equal to the width of the View Center_inside/centerinsideCenter The contents of the picture in full, by shrinking the scale or the original size Make the picture long and wide equal to or less than The length and width of the ViewFit_center/fitcenterenlarges/shrinks the image to the width of the VIEW, centered on the displayFit_end/fitendZoom in/out of the image to the width of the view , centered in the lower part of the view Fit_start/fitstartZoom in/out of the picture to the width of the view , centered in the upper position of the view Fit_xy/fitxyenlarge / shrink image to view size display Matrix/matrixThe matrix is used to draw and zoom in and out of the image to display. Android:interpolatorControl Animation Progress (Alpha scale translate rotate) Androidseveral interpolator subclasses are provided to achieve different speed curves, as follows AcceleratedcelerateinterpolatorThe rate at which the animation begins and where it is introduced is slower and then starts to accelerateCycleinterpolatorAnimation loop is put in a specific number of times, rate changes along the sinusoidalDecelerateinterpolatorat the beginning of the animation, the rate change is slow, then start slowing downLinearinterpolatorchange at an even rate in the animationandroid:screenorientation= "Portrait" to specify Screen as portrait android:screenorientation= "Landscape" to specify screen as horizontal screen android:capitalizeset the English letter capitalization typeAndroid:cursorvisiblesets whether the cursor is displayedAndroid:digitssets which characters are allowed to be entered. such as "123456&*" Android:drawablebottom: outputs a drawable below the text . If the color is set to the background color Android:drawableleft: outputs a drawable to the left of text . Android:drawableright: outputs a drawable to the right of text . Android:drawabletop: outputs a drawable at the top of the text . Android:editableset whether it can be editedAndroid:editorextrassets the additional input data for the text. Android:ellipsizesets how the control is displayed when the text is too long, with the following propertiesStartellipses appear at the beginning end ellipses at the end Middlethe ellipsis is displayed in the middle Marquee in the Way of a marquee (animated lateral movement) Android:emssets the width of a TextView to N characters Android:freezestextsets the contents of the saved text and the cursor built-inAndroid:includefontpaddingsets whether text contains top and bottom extra whitespace, which is true by defaultAndroid:inputmethodspecifying an input method for text requires a fully qualified name (full package name)Android:inputtypeset the type of Guangxi to help the input method display the appropriate keyboard typeAndroid:linesset the number of lines the text displaysAndroid:linespacingextraSet Line spacingAndroid:linespacingmultipliersets the multiple of line spacing. such as 1.3 Android:linksclickablesets whether the link clicks the connection, even if the Autolick is setAndroid:marqueerepeatlimit Sets the number of repeated scrolls in the case of ellipsize specified. When you setMarquee_forever last represents an infinite number of timesAndroid:maxemsSets the width of the TextView to a maximum of N characters. overwrite EMS option when used in conjunction with EMS Android:maxheightSets the maximum height of the text area Android:maxlengthLimits the length of text that is displayed, which is not displayed. Android:maxlinesSets the maximum number of lines to display for text, andWidthOrLayout_widthIn combination, a partial wrap is exceeded, and the number of rows exceeded is not displayed. Android:maxwidth Set the maximum width of the text area Android:minems set nems overwrite ems option. Android:minheight Set the minimum height of the text area Android:minlineslines similar. Android:minwidth Set the minimum width of the text area Android:numerictextview There is a digital input method. Android:passwordwith a small dot "." display text Android:phonenumberSet the input mode for phone number android:privateimeoptionsSet IME Options android:scrollhorizontallySetting text BeyondTextViewThe width of the case, whether the cross bar appears Android:selectallonfocusIf the text is selectable, let him get the focus instead of moving the cursor to the beginning or end of the text.TextViewNo effect when set in. Android:shadowcolorSpecifies the color of the text shadow that you want to use with Shadowradius to set the start position of the shadow horizontal coordinates with ANDROID:SHADOWDX. Android:shadowdy Sets the start position of the shadow vertical coordinates. Android:shadowradius Sets the radius of the shadow. Set to 0.1 will become the color of the font, generally set to 3.0 effect is better. Android:singleline Sets the single-line display. If used with Layout_width , when the text cannot be displayed in its entirety, it is followed by "..." . such as android:text= "Test_ singleline" Adnroid:stretchcolumnsInTablelayoutSpecifies the number of columns to use as a stretch (when filling out the screen) Android:textSet display text. Android:textsizeSet text size, recommended unit of measure"SP" or"PT" Android:textstyleSet font style[Bold (Bold body) 0, Italic (Italic body) 1, Bolditalic ( coarse and oblique 2]  "|" Android:typeface Set the text font, which must be one of the following constant values: equal width font ) 3 Android:width Set the width of the text area, support units of measure: Span style= "font-family: ' Times New Roman ';" >PX ( pixels , with layout_width look here

Android Layout Properties Daquan

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.