Android Common Interface layout (ii)

Source: Internet
Author: User

ImageView

The ScaleType property that represents how the picture is displayed

①matrix a 3x3 matrix to zoom in on one of the images

②fitxy scale the picture proportionally to the same size as the ImageView

③fitstart zoom in the same way as Fit_center, just display the picture on the left or top instead of centering

④fitcenter imageview default state, large image, such as scale reduction, small graph and other proportional amplification, the overall center display in the ImageView

⑤fitend zoom mode with Fit_center, just display the picture on the right or bottom instead of centering

⑥center if the picture is larger than the ImageView control, the middle part of the picture is truncated, and if it is smaller, the picture is centered directly

⑦centercrop the picture, such as scale, so that the short edge of the image and the ImageView edge length is the same, that is, can not leave blank, zoom and then intercept the middle part to display

⑧centerinside the picture size is larger than ImageView, and so on, until the entire picture can be centered in the ImageView, less than the imageview of the picture is not changed, directly centered display




Textview/edittext

Android:maxlength

Limit the number of input characters

Android:maxlines

Sets the maximum number of lines of text to display, used in conjunction with Layout_width, to exceed the number of lines that are not displayed.

Android:linespacingextra

Sets the line spacing.

Android:autolink

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

Android:autotext

If set, the spelling correction of the input values will be performed automatically. There is no effect here, it works when the input method is displayed and entered.

Android:cursorvisible

Set cursor to show/hide, default display

Android:digits

Sets which characters are allowed to be entered. such as "1234567890.+-*/% ()"

Android:drawablebottom

Output a drawable below the text

Android:drawableleft

Output a drawable to the left of text

Android:drawableright

Output a drawable to the right of text

Android:drawabletop

Output a drawable directly above the text

Android:drawablepadding

Set the interval between text and drawable, use with drawableleft/right, and so on, can be set to negative, use invalid alone

Android:editable

Set whether it can be edited

Android:imeoptions

Additional functions, set the actions associated with the edit box in the lower right corner of the IME action

Android:imeactionid

Set IME action ID

Android:imeactionlabel

Set IME Action Labels

Android:includefontpadding

Sets whether text contains top and bottom extra whitespace, which defaults to True

Android:inputmethod

Specifying an input method for text requires a fully qualified name (full package name)

Android:inputtype

Sets the type of text used to help the input method display the appropriate keyboard type

Android:linksclickable

Sets whether the link clicks the connection, even if the Autolink is set

Android:password

with a small dot "." Display text

Android:phonenumber

How to enter a phone number

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 "..."

Android:textcolorhint

Sets the color of the message text, which is grayed out by default. Use with hint

Android:textcolorlink

Color of text links

Android:textscalex

Set spacing between words, default to 1.0f

Android:textstyle

set Glyph [Bold ( bold) 0, Italic (italic) 1, bolditalic (coarse and oblique) 2] can be set multiple, with "|" Separated

Android:typeface

Set the text font to one of the following constant values: normal 0, sans 1, serif 2, monospace (equal 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 width of the text area

Android:maxwidth

Set the maximum width of the text area

Android:minwidth

Set the minimum width of the text area

Android:hinttext

Text message displayed when empty, can be set by textcolorhint the color of the hint information

Android:ellipsize

Sets how the control is displayed when the text is too long. The start ellipsis is at the beginning; End ellipsis at the end; Middle ellipsis in the middle; Marquee display in the form of a marquee (animated lateral movement)



-----below for finishing

Listview

Spinner a combo control that displays a TextView and an associated ListView, and allows you to select an entry from this list and display it in a text box

Button

ToggleButton

ImageButton

CheckBox

Raidobutton

Viewflipper allows a group of view to be defined as a horizontal row of view group, with only one view visible at any time, and transitions between view are animated

Videoview handles all state management and display surface configurations for video playback

Quickcontactbadge displays a logo that displays a picture that associates the contact information specified by phone number, name, email, or URL, and clicks the picture to display the quick contact bar

Viewpager implements a horizontal scrollable view that allows users to toggle between views by clicking or dragging and dropping

chronometer a textview extension to implement a simple timer

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.