Android Interface Properties

Source: Internet
Author: User

 

Some important attributes used by relativelayout:

Class 1: the property value is true or false.
Android: layout_centerhrizontal horizontal center
Android: layout_centervertical vertical center
Android: layout_centerinparent is completely centered over the parent Element
Android: layout_alignparentbottom: attach the lower edge of the parent Element
Android: layout_alignparentleft: Stick the left edge of the parent Element
Android: layout_alignparentright: attaches the right edge of the parent element.
Android: layout_alignparenttop: top the parent Element
Android: layout_alignwithparentifmissing

Class 2: the property value must be the reference name "@ ID/ID-name" of the ID"
Android: layout_below is under an element
Android: layout_abve is above an element.
Android: layout_toleftof on the left of an element
Android: layout_torightof on the right of an element

Android: layout_aligntop: Align the top edge of an element with the top edge of an element.
Android: layout_alignleft: Align the left edge of an element with the left edge of an element.
Android: layout_alignbottom: the bottom edge of the current element is aligned with the bottom edge of an element.
Android: layout_alignright: the right edge of an element is aligned with the right edge of an element.

Category 3: attribute values are specific pixel values, such as 30dip and 40px.
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 edge of an element

Android: padding = "15dip" padding refers to the padding (that is, the distance between the content and the border), and layout_margin refers to the margin (the distance between the top layer and the border ).

 

Textview

Android: hint Sethint (INT)

This text is displayed when the content displayed in textview is empty.

Android: Typeface Settypeface (typeface) Set textview text font
Android: ellipsize Setellipsize (textutils. truncateat) If this attribute is set, content is omitted when the content to be displayed in textview spans the length of textview. Optional values include start, middle, end, and marquee.

Edittext
 

Android: shadowcolor Setshadowlayer (float, INT) Set the shadow of the specified color for the text box
Droid: shadowradius Setshadowlayer (float, INT) Set the shadow radius for the text box to a floating point number.
Android: singleline Settransformationmethod (transformationmethod) Set the single row mode of the text box

 

Related Article

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.