Android Control TextView (display text box control) and EditText (Input TextBox control)

Source: Internet
Author: User

TextView (Display text box control)

  1. Common Properties of TextView controls

    android:id--the ID of the control

android:layout_width--width of the control

android:layout_height--height of the control

android:text--text content

android:textsize--Text Size

android:textcolor--text color

android:background--Control Background

<TextViewAndroid:id= "@+id/name"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:text= "@string/name"android:textsize= "28SP"Android:textcolor= "#000000"     />    <!--wrap_content: Wrapping the actual text content fill_parent: The current control fills the parent class container (exclusive row): 2.3api before adding a property value match_parent: The current control fills the parent class container (exclusive row ): Add a property value after 2.3api -

Second, EditText (Input TextBox control) 

1. Common Properties of EditText controls

android:id--The ID of the control

android:layout_width--width of the control

android:layout_height--height of the control

android:text--text content (default values can be set)

android:textsize--Text Size

android:textcolor--text color

android:background--Control Background

android:hint--input Hint text

android:inputtype--Input Text Type

< EditText         Android:id = "@+id/editname"         android:layout_width= "Match_parent"        android:layout_height= "Wrap_ Content "        android:inputtype=" Textpersonname "         android:hint  = "@string/editname">    </EditText>

Android Control TextView (display text box control) and EditText (Input TextBox control)

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.