Common Android interface layout (2)

Source: Internet
Author: User

ImageView

ScaleType attribute, used to display images

① Matrix scales the Image Based on A 3x3 matrix.

② FitXY scales the image proportionally to the same size as ImageView

③ FitStart is scaled in the same way as FIT_CENTER, but the image is displayed on the left or top, rather than in the center.

④ The default status of the fitCenter ImageView, Which is scaled down by a larger image, or scaled up by a smaller image. The overall center is displayed in the ImageView.

⑤ The fitEnd scaling method is the same as that of FIT_CENTER. The only difference is that the image is displayed on the right or bottom, rather than in the center.

⑥ If the image size is greater than the ImageView control, the middle part of the image is taken. If the value is smaller than the value, the image is displayed in the center.

7. centerCrop scales the image proportionally, so that the short side of the image is the same as the side length of the ImageView, that is, the image cannot be left blank. After the scale, the middle part is taken for display.

⑧ CenterInside scales down the image size greater than ImageView until the entire image is displayed in the middle of the ImageView. The image smaller than ImageView remains unchanged and is displayed in the center.




TextView/EditText

Android: maxLength

Limit the number of input characters

Android: maxLines

Set the maximum number of lines to display in text. This parameter is used with layout_width. If the line exceeded is automatically wrapped, the line exceeded is not displayed.

Android: lineSpacingExtra

Set the line spacing.

Android: autoLink

The text is link/email/phone number/, and displayed as a clickable link. (None/web/email/phone/map/all)

Android: autoText

If this parameter is set, the spelling of the input value is automatically corrected. There is no effect here. It works when the input method is displayed and entered.

Android: cursorVisible

Set the cursor to show/hide, default display

Android: digits

Specifies the characters that can be entered. For example, "1234567890. +-*/% ()"

Android: drawableBottom

Output A drawable under text

Android: drawableLeft

Output A drawable on the left of text

Android: drawableRight

Output A drawable on the Right of text

Android: drawableTop

Output A drawable on the top of the text

Android: drawablePadding

Sets the interval between text and drawable, used together with drawableLeft/right, and can be set to a negative number.

Android: editable

Set whether to edit

Android: imeOptions

Additional function to set the IME action in the lower-right corner and the action related to the edit box

Android: imeActionId

Set IME action ID

Android: imeActionLabel

Set IME action labels

Android: includeFontPadding

Sets whether the text contains additional white space at the top and bottom. The default value is true.

Android: inputMethod

Specify the Input Method for text. You must specify the full package name)

Android: inputType

Set the text type to help the input method display the appropriate keyboard type

Android: linksClickable

Set whether to click the connection even if autoLink is set

Android: password

Show text in small dots "."

Android: phoneNumber

Set as the telephone number Input Method

Android: singleLine

Set single row display. If it is used with layout_width, when the text cannot be fully displayed, "…" is used later. To indicate

Android: textColorHint

Set the color of the prompt text. The default value is gray. Used with hint

Android: textColorLink

Text Link color

Android: textScaleX

Set the text interval. The default value is 1.0f.

Android: textStyle

You can set multiple [bold (bold) 0, italic (italic) 1, and bolditalic (bold and oblique) 2] separated by "| ".

Android: typeface

Set text font. One of the following constant values: normal 0, sans 1, serif 2, monospace (same width font) 3]

Android: height

Set the height of the text area

Android: maxHeight

Set the maximum height of the text area

Android: minHeight

Set the minimum height of the text area

Android: width

Set the text area width

Android: maxWidth

Set the maximum width of the text area

Android: minWidth

Set the minimum width of the text area

Android: hintText

Text prompt information displayed when it is null. You can use textColorHint to set the color of the prompt information.

Android: ellipsize

Set how to display the control when the text is too long. Start ellipsis starts with; end ellipsis ends with; middle ellipsis is in the middle; marquee is displayed in the form of a marquee (horizontal animation Movement)



----- The following is pending

ListView

The combination control of the Spinner to display a TextView and an associated ListView, and allows you to select an entry from the list and display it in the text box.

Button

ToggleButton

ImageButton

CheckBox

RaidoButton

ViewFlipper allows a group of views to be defined as a view group of horizontal rows. Only one view is visible at any time. switching between views is represented in an animation.

VideoView processes all status management and display surface configurations for video playback.

QuickContactBadge displays a logo that displays an image associated with the contact information specified by the phone number, name, email, or URL. Click the icon to display the quick contact bar.

ViewPager implements a set of Horizontally scrollable views, allowing users to switch between different views by clicking or dragging left or right

Chronometer A textview extension to implement a simple Timer

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.