Android Development notes-attributes learned today

Source: Internet
Author: User

Before leaving the lab, I posted some basic knowledge I learned this afternoon (what did I do this morning? I am busy restoring data ):

1. LastProgramDuring packaging, files in the res folder are packaged only when used, and files in the assets folder must be packaged whether or not used.
2. Android mainly relies on XML files for layout. Otherwise, the layout will be messy when there are too many textviews.
3. Android: The singleline attribute is true, indicating that the text is displayed in one line.
Android: ellipsize attribute: sets how to display (display ellipsis) when the text is too long. Start, end, and middle respectively set the ellipsis positions. marquee indicates that it is displayed in the form of a marquee.
Android: autolink = "Web/email/phone/all"
Android: focusable = "True/false" indicates whether focus can be obtained.
Ndroid: focusableintouchmode = "true" Get focus in touch mode
4. Controls:
<Edittext
Android: layout_width = "fill_parent"
Android: layout_height = "wrap_content"
/> By default, focus is required. The solution is to add an edittext control before it, and set the width and height to 0,
Android: maxlength = "3" attribute limits the number of characters,
Android: singleline = "false" to change it to multi-line text box
Android: inputtype = "Number" sets the input type
Android: hint = "13525505014" sets the default display information

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.