TextView: The view used to display text cannot be edited
1.android:text="text content" display text content
2.android:textSize="10sp" font size The size must be sp
3.android:textColor="color code" font color
4.android:textStyle="bold" set font style style font style bold bold italic tilt normal normal
5.android:singleLine="true" Set the text to be displayed in a single line. The excess part is represented by...
6.android:lines="3" The number of lines displayed in the current view. If the content exceeds, it will not be displayed. If the content is not enough, the height will be displayed.
7.android:maxlines="4" What is the maximum number of lines in the current view? If the content exceeds it, it will not be displayed. If the content is not enough, it will be wrapped
8.android:minlimes="3" What is the minimum number of rows in the current view, and at least how many rows must be displayed
9.android:ems="8" What is the maximum number of characters displayed in each line, if it exceeds the word wrap
10.android:maxWidth="20dp" maximum width
11.android:minWidth="20dp" minimum width
12.android:ellipsize="start /end/middle" When used with singleLine, it indicates where the excess text is displayed at the beginning, the end, and the middle
maequee means marquee
EditText text input box can be used to display text support input
It is a subclass of TextView so it has all the attributes of TextView
1. android:hint= " please enter content " is used for prompting. When the displayed content is empty, the prompt content is displayed. When there is displayed content, the prompt content is not displayed
2.android:inputType= "" edit input into the keyboard-type pattern and display of results,
phone only allows numbers
text can be entered
textPassword After inputting the ciphertext, it will become····Password box effect
address and the like may be adjustable soft keyboard displayed class type
3.textSize textColor id etc. These attributes of EditText are some
4. How java files eligible to take EditText content entered it
The first step in the java generation of the code in the eligible to take this a view of the pair of object
EditText et =(EditText)findViewById(R.id.editText);
The second step String context=et.getText () .toString ;